diff --git a/README.md b/README.md index 018749a8f..f49feeb49 100644 --- a/README.md +++ b/README.md @@ -468,6 +468,7 @@ MonkeyC MoonScript MsBuild Mustache +Nickel Nim Nix NotQuitePerl diff --git a/languages.json b/languages.json index 13685b9fa..6c0fae693 100644 --- a/languages.json +++ b/languages.json @@ -37,7 +37,7 @@ "name": "APL", "line_comment": ["⍝"], "extensions": ["apl", "aplf", "apls"], - "quotes": [["'", "'"]], + "quotes": [["'", "'"]] }, "Arduino": { "name": "Arduino C++", @@ -181,7 +181,7 @@ "name": "BQN", "line_comment": ["#"], "extensions": ["bqn"], - "quotes": [["\\\"", "\\\""], ["'", "'"]], + "quotes": [["\\\"", "\\\""], ["'", "'"]] }, "BrightScript": { "quotes": [["\\\"", "\\\""]], @@ -1147,6 +1147,12 @@ "quotes": [["\\\"", "\\\""]], "extensions": ["nextflow", "nf"] }, + "Nickel": { + "line_comment": ["#"], + "quotes": [["\\\"", "\\\""]], + "verbatim_quotes": [["m%\\\"", "\\\"%"], ["-s%\\\"", "\\\"%"]], + "extensions": ["ncl"] + }, "Nim": { "line_comment": ["#"], "quotes": [["\\\"", "\\\""], ["\\\"\\\"\\\"", "\\\"\\\"\\\""]], diff --git a/tests/data/nickel.ncl b/tests/data/nickel.ncl new file mode 100644 index 000000000..dce00a253 --- /dev/null +++ b/tests/data/nickel.ncl @@ -0,0 +1,21 @@ +# 21 lines 15 code 3 comments 3 blanks + +# A comment +let log = m%" +if log: + print("log:", s) +"% in + +{ + # A list with normal strings + args = ["-c", "-v"], + + derivations = nix-s%" + pkgs.writeShellApplication { + runtimeInputs = with pkgs; [ python3 ]; + text = '' + %{log} + ''; + }; + "%, +}