@@ -0,0 +1,97 @@
1+ ; highlights.scm
2+
3+function_keyword: (function_keyword) @keyword.function
4+
5+(function_definition
6+function_name: (identifier) @function
7+(end) @function)
8+
9+(parameter_list (identifier) @variable.parameter)
10+
11+[
12+ "if"
13+ "elseif"
14+ "else"
15+ "switch"
16+ "case"
17+ "otherwise"
18+] @keyword.control.conditional
19+
20+(if_statement (end) @keyword.control.conditional)
21+(switch_statement (end) @keyword.control.conditional)
22+
23+["for" "while"] @keyword.control.repeat
24+(for_statement (end) @keyword.control.repeat)
25+(while_statement (end) @keyword.control.repeat)
26+
27+["try" "catch"] @keyword.control.exception
28+(try_statement (end) @keyword.control.exception)
29+
30+(function_definition end: (end) @keyword)
31+
32+["return" "break" "continue"] @keyword.return
33+
34+(
35+(identifier) @constant.builtin
36+(#any-of? @constant.builtin "true" "false")
37+)
38+
39+(
40+ (identifier) @constant.builtin
41+ (#eq? @constant.builtin "end")
42+)
43+
44+;; Punctuations
45+
46+[";" ","] @punctuation.special
47+(argument_list "," @punctuation.delimiter)
48+(vector_definition ["," ";"] @punctuation.delimiter)
49+(cell_definition ["," ";"] @punctuation.delimiter)
50+":" @punctuation.delimiter
51+(parameter_list "," @punctuation.delimiter)
52+(return_value "," @punctuation.delimiter)
53+
54+; ;; Brackets
55+
56+[
57+ "("
58+ ")"
59+ "["
60+ "]"
61+ "{"
62+ "}"
63+] @punctuation.bracket
64+
65+;; Operators
66+"=" @operator
67+(operation [ ">"
68+ "<"
69+ "=="
70+ "<="
71+ ">="
72+ "=<"
73+ "=>"
74+ "~="
75+ "*"
76+ ".*"
77+ "/"
78+ "\\"
79+ "./"
80+ "^"
81+ ".^"
82+ "+"] @operator)
83+
84+;; boolean operator
85+[
86+ "&&"
87+ "||"
88+] @operator
89+
90+;; Number
91+(number) @constant.numeric
92+
93+;; String
94+(string) @string
95+
96+;; Comment
97+(comment) @comment