@@ -0,0 +1,145 @@
1+[
2+ "="
3+ "^^"
4+ "||"
5+ "&&"
6+ "+"
7+ "-"
8+ "*"
9+ "/"
10+ "%"
11+ "|"
12+ "^"
13+ "=="
14+ "!="
15+ ">"
16+ ">="
17+ "<="
18+ "<"
19+ "<<"
20+ ">>"
21+ ".."
22+ "--"
23+ "++"
24+ "+"
25+ "-"
26+ "~"
27+ "!"
28+ "&"
29+ "->"
30+ "*"
31+] @operator
32+
33+[
34+ "("
35+ ")"
36+ "{"
37+ "}"
38+ "["
39+ "]"
40+] @punctuation.bracket
41+
42+[
43+ ","
44+ "."
45+ ";"
46+] @punctuation.delimiter
47+
48+; Constants
49+[
50+ (access_class)
51+ (address)
52+ (bitmask)
53+ (file_handle)
54+ (frequency)
55+ (time)
56+] @constant.builtin
57+
58+[
59+ (float)
60+ (percentage)
61+] @constant.numeric.float
62+
63+(integer) @constant.numeric.integer
64+
65+(character) @constant.character
66+
67+; Strings
68+(string) @string
69+
70+(path) @string.special.path
71+
72+(symbol) @string.special.symbol
73+
74+; Returns
75+(
76+ (command_expression
77+ command: (identifier) @keyword.return)
78+ (#match? @keyword.return "^[eE][nN][dD]([dD][oO])?$")
79+)
80+(
81+ (command_expression
82+ command: (identifier) @keyword.return)
83+ (#match? @keyword.return "^[rR][eE][tT][uU][rR][nN]$")
84+)
85+
86+; Subroutine calls
87+(subroutine_call_expression
88+ command: (identifier) @keyword
89+ subroutine: (identifier) @function)
90+
91+; Subroutine blocks
92+(subroutine_block
93+ command: (identifier) @keyword
94+ subroutine: (identifier) @function)
95+
96+(labeled_expression
97+ label: (identifier) @function
98+ (block))
99+
100+; Parameter declarations
101+(parameter_declaration
102+ command: (identifier) @keyword
103+ (identifier)? @constant.builtin
104+ macro: (macro) @variable.parameter)
105+
106+; Variables, constants and labels
107+(macro) @variable
108+(internal_c_variable) @variable
109+
110+(
111+ (command_expression
112+ command: (identifier) @keyword
113+ arguments: (argument_list . (identifier) @label))
114+ (#match? @keyword "^[gG][oO][tT][oO]$")
115+)
116+(labeled_expression
117+ label: (identifier) @label)
118+
119+(
120+ (argument_list (identifier) @constant.builtin)
121+ (#match? @constant.builtin "^[%/][a-zA-Z][a-zA-Z0-9.]*$")
122+)
123+(argument_list
124+ (identifier) @constant)
125+
126+; Commands
127+(command_expression command: (identifier) @keyword)
128+(macro_definition command: (identifier) @keyword)
129+
130+; Control flow
131+(if_block
132+ command: (identifier) @keyword.control.conditional.if)
133+(else_block
134+ command: (identifier) @keyword.control.control.else)
135+
136+(while_block
137+ command: (identifier) @keyword.control.repeat.while)
138+(repeat_block
139+ command: (identifier) @keyword.control.loop)
140+
141+(call_expression
142+ function: (identifier) @function)
143+
144+(type_identifier) @type
145+(comment) @comment