diff --git a/Unix/cloc b/Unix/cloc index 0a6bb20a..18c596c1 100755 --- a/Unix/cloc +++ b/Unix/cloc @@ -9066,6 +9066,7 @@ sub set_constants { # {{{1 'pawn' => 'Pawn' , 'ses' => 'Patran Command Language' , 'pcl' => 'Patran Command Language' , + 'pek' => 'Pek' , 'peg' => 'PEG' , 'pegjs' => 'peg.js' , 'peggy' => 'peggy' , @@ -10466,6 +10467,10 @@ sub set_constants { # {{{1 [ 'rm_comments_in_strings', '"', '//', '' ], [ 'call_regexp_common' , 'C++' ], ], + 'Pek' => [ + [ 'remove_matches' , '^\s*//' ], + [ 'remove_inline' , '//.*$' ], + ], 'Pest' => [ [ 'remove_matches' , '^\s*//' ], [ 'remove_inline' , '//.*$' ], @@ -11584,6 +11589,7 @@ sub set_constants { # {{{1 'PEG' => 3.00, 'peg.js' => 3.00, 'peggy' => 3.00, + 'Pek' => 2.50, 'Pest' => 2.00, 'tspeg' => 3.00, 'Pig Latin' => 1.00, diff --git a/Unix/t/00_C.t b/Unix/t/00_C.t index 26483501..b04d4b8c 100755 --- a/Unix/t/00_C.t +++ b/Unix/t/00_C.t @@ -866,6 +866,11 @@ my @Tests = ( 'ref' => '../tests/outputs/sdp_parser.peggy.yaml', 'args' => '../tests/inputs/sdp_parser.peggy', }, + { + 'name' => 'Pek', + 'ref' => '../tests/outputs/pek_example.pek.yaml', + 'args' => '../tests/inputs/pek_example.pek', + }, { 'name' => 'Pest', 'ref' => '../tests/outputs/toml.pest.yaml', diff --git a/cloc b/cloc index 7e911bf1..574ba36e 100755 --- a/cloc +++ b/cloc @@ -9081,6 +9081,7 @@ sub set_constants { # {{{1 'pawn' => 'Pawn' , 'ses' => 'Patran Command Language' , 'pcl' => 'Patran Command Language' , + 'pek' => 'Pek' , 'peg' => 'PEG' , 'pegjs' => 'peg.js' , 'peggy' => 'peggy' , @@ -10481,6 +10482,10 @@ sub set_constants { # {{{1 [ 'rm_comments_in_strings', '"', '//', '' ], [ 'call_regexp_common' , 'C++' ], ], + 'Pek' => [ + [ 'remove_matches' , '^\s*//' ], + [ 'remove_inline' , '//.*$' ], + ], 'Pest' => [ [ 'remove_matches' , '^\s*//' ], [ 'remove_inline' , '//.*$' ], @@ -11599,6 +11604,7 @@ sub set_constants { # {{{1 'PEG' => 3.00, 'peg.js' => 3.00, 'peggy' => 3.00, + 'Pek' => 2.50, 'Pest' => 2.00, 'tspeg' => 3.00, 'Pig Latin' => 1.00, diff --git a/tests/inputs/pek_example.pek b/tests/inputs/pek_example.pek new file mode 100644 index 00000000..36df6fca --- /dev/null +++ b/tests/inputs/pek_example.pek @@ -0,0 +1,15 @@ +// https://github.com/nektro/zig-pek/tree/master +// language request: pek #855 + +html[lang="en"]( + head( + title("Pek Example") + meta[charset="UTF-8"] + meta[name="viewport" content="width=device-width,initial-scale=1"] + ) + body( + h1("Pek Example") + hr + p("This is an example HTML document written in "a[href="https://github.com/nektro/zig-pek"]("Pek")".") + ) +) diff --git a/tests/outputs/pek_example.pek.yaml b/tests/outputs/pek_example.pek.yaml new file mode 100644 index 00000000..90de4a8e --- /dev/null +++ b/tests/outputs/pek_example.pek.yaml @@ -0,0 +1,21 @@ +--- +# github.com/AlDanial/cloc +header : + cloc_url : github.com/AlDanial/cloc + cloc_version : 2.03 + elapsed_seconds : 0.00303912162780762 + n_files : 1 + n_lines : 15 + files_per_second : 329.042441358751 + lines_per_second : 4935.63662038127 + report_file : tests/outputs/pek_example.pek.yaml +'Pek' : + nFiles: 1 + blank: 1 + comment: 2 + code: 12 +SUM: + blank: 1 + comment: 2 + code: 12 + nFiles: 1