Skip to content

Commit

Permalink
Add support for Nickel
Browse files Browse the repository at this point in the history
  • Loading branch information
folliehiyuki committed Mar 8, 2025
1 parent 62a564d commit 20ada44
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ MonkeyC
MoonScript
MsBuild
Mustache
Nickel
Nim
Nix
NotQuitePerl
Expand Down
10 changes: 8 additions & 2 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"name": "APL",
"line_comment": [""],
"extensions": ["apl", "aplf", "apls"],
"quotes": [["'", "'"]],
"quotes": [["'", "'"]]
},
"Arduino": {
"name": "Arduino C++",
Expand Down Expand Up @@ -181,7 +181,7 @@
"name": "BQN",
"line_comment": ["#"],
"extensions": ["bqn"],
"quotes": [["\\\"", "\\\""], ["'", "'"]],
"quotes": [["\\\"", "\\\""], ["'", "'"]]
},
"BrightScript": {
"quotes": [["\\\"", "\\\""]],
Expand Down Expand Up @@ -1147,6 +1147,12 @@
"quotes": [["\\\"", "\\\""]],
"extensions": ["nextflow", "nf"]
},
"Nickel": {
"line_comment": ["#"],
"quotes": [["\\\"", "\\\""]],
"verbatim_quotes": [["m%\\\"", "\\\"%"], ["-s%\\\"", "\\\"%"]],
"extensions": ["ncl"]
},
"Nim": {
"line_comment": ["#"],
"quotes": [["\\\"", "\\\""], ["\\\"\\\"\\\"", "\\\"\\\"\\\""]],
Expand Down
21 changes: 21 additions & 0 deletions tests/data/nickel.ncl
Original file line number Diff line number Diff line change
@@ -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}
'';
};
"%,
}

0 comments on commit 20ada44

Please sign in to comment.