Skip to content

Commit b43738b

Browse files
committed
adding syntax highlighting for nano
1 parent 8a1a3e8 commit b43738b

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

arkscript.nanorc

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
syntax "ArkScript" "\.ark$"
2+
3+
## built-in objects
4+
color brightmagenta "\<(nil|true|false)\>"
5+
6+
## captures
7+
color brightgreen "&[a-zA-Z_][a-zA-Z0-9_\-?']*"
8+
9+
## keywords
10+
color brightblue "\<(set|del|import|quote|begin|let|mut|fun|if|while)\>"
11+
color brightcyan "\<(append|concat|list|print|input|writeFile|readFile|writeFile|fileExists?)\>"
12+
13+
## operators
14+
color brightyellow "[.+*|=!@'\^]" "<" ">" "/" "-" "and" "or" "mod" "type" "hasfield" "len" "empty?" "firstof" "tailof" "headof" "nil?" "assert" "toNumber" "toString"
15+
16+
## blocks
17+
color yellow "[()]" "\[" "\]" "\{" "\}"
18+
19+
## numbers
20+
icolor brightred "\b(([1-9][0-9]+)|0+)\.[0-9]+\b" "\b([1-9][0-9]*)\b" "\b0o?[0-7]*\b" "\b0x[1-9a-f][0-9a-f]*\b" "\b0b[01]+\b"
21+
22+
## strings
23+
color yellow "["][^"]*[^\\]["]"
24+
25+
## trailing spaces
26+
color ,green "[[:space:]]+$"
27+
28+
## comments
29+
color blue "#.*"

0 commit comments

Comments
 (0)