diff options
author | James Brown <roguelazer@roguelazer.com> | 2022-08-22 10:38:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-22 19:38:32 +0200 |
commit | 9e08721c04380be70c9affd1b802012399dfe5d1 (patch) | |
tree | 6208832acfd1c9ff78f44fe6eb9083a9a7ccb761 | |
parent | ad863b583aa3bb9c9587ebb6eac451a27fa5d2c6 (diff) |
add Puppet to tokei; steal .pp from Pascal (#914)
-rw-r--r-- | languages.json | 7 | ||||
-rw-r--r-- | tests/data/puppet.pp | 18 |
2 files changed, 24 insertions, 1 deletions
diff --git a/languages.json b/languages.json index c2daa6b..34f9c6d 100644 --- a/languages.json +++ b/languages.json @@ -989,7 +989,7 @@ "line_comment": ["//"], "multi_line_comments": [["{", "}"], ["(*", "*)"]], "quotes": [["'", "'"]], - "extensions": ["pas", "pp"] + "extensions": ["pas"] }, "Perl": { "shebangs": ["#!/usr/bin/perl"], @@ -1077,6 +1077,11 @@ ], "extensions": ["pug"] }, + "Puppet": { + "line_comment": ["#"], + "quotes": [["\\\"", "\\\""], ["'", "'"]], + "extensions": ["pp"] + }, "PureScript": { "nested": true, "line_comment": ["--"], diff --git a/tests/data/puppet.pp b/tests/data/puppet.pp new file mode 100644 index 0000000..b24e89a --- /dev/null +++ b/tests/data/puppet.pp @@ -0,0 +1,18 @@ +# 18 lines 14 code 3 comments 1 blanks +class example::class( + $param1, + $param2=2, + $param3=undef, # pass this one +) { + # comments are really simple + some::resource { + 'bar': + param1 => param2, + # comments here too + param3 => param4; + } + + some::other::resource { + 'baz': + } +} |