@@ -1,52 +1,3 @@
1−; Special identifiers
2−;--------------------
3−
4−([
5− (identifier)
6− (shorthand_property_identifier)
7− (shorthand_property_identifier_pattern)
8− ] @constant
9− (#match? @constant "^[A-Z_][A-Z\\d_]+$"))
10−
11−
12−((identifier) @constructor
13− (#match? @constructor "^[A-Z]"))
14−
15−((identifier) @variable.builtin
16− (#match? @variable.builtin "^(arguments|module|console|window|document)$")
17− (#is-not? local))
18−
19−((identifier) @function.builtin
20− (#eq? @function.builtin "require")
21− (#is-not? local))
22−
23−; Function and method definitions
24−;--------------------------------
25−
26−(function
27− name: (identifier) @function)
28−(function_declaration
29− name: (identifier) @function)
30−(method_definition
31− name: (property_identifier) @function.method)
32−
33−(pair
34− key: (property_identifier) @function.method
35− value: [(function) (arrow_function)])
36−
37−(assignment_expression
38− left: (member_expression
39− property: (property_identifier) @function.method)
40− right: [(function) (arrow_function)])
41−
42−(variable_declarator
43− name: (identifier) @function
44− value: [(function) (arrow_function)])
45−
46−(assignment_expression
47− left: (identifier) @function
48− right: [(function) (arrow_function)])
49−
501; Function and method parameters
512;-------------------------------
523
@@ -84,174 +35,4 @@
8435(arrow_function
8536 parameter: (identifier) @variable.parameter)
8637
87−; Function and method calls
88−;--------------------------
89−
90−(call_expression
91− function: (identifier) @function)
92−
93−(call_expression
94− function: (member_expression
95− property: (property_identifier) @function.method))
96−
97−; Variables
98−;----------
99−
100−(identifier) @variable
101−
102−; Properties
103−;-----------
104−
105−(property_identifier) @variable.other.member
106−(shorthand_property_identifier) @variable.other.member
107−(shorthand_property_identifier_pattern) @variable.other.member
108−
109−; Literals
110−;---------
111−
112−(this) @variable.builtin
113−(super) @variable.builtin
114−
115−[
116− (true)
117− (false)
118− (null)
119− (undefined)
120−] @constant.builtin
121−
122−(comment) @comment
123−
124−[
125− (string)
126− (template_string)
127−] @string
128−
129−(regex) @string.regexp
130−(number) @constant.numeric.integer
131−
132−; Tokens
133−;-------
134−
135−(template_substitution
136− "${" @punctuation.special
137− "}" @punctuation.special) @embedded
138−
139−[
140− ";"
141− "?."
142− "."
143− ","
144−] @punctuation.delimiter
145−
146−[
147− "-"
148− "--"
149− "-="
150− "+"
151− "++"
152− "+="
153− "*"
154− "*="
155− "**"
156− "**="
157− "/"
158− "/="
159− "%"
160− "%="
161− "<"
162− "<="
163− "<<"
164− "<<="
165− "="
166− "=="
167− "==="
168− "!"
169− "!="
170− "!=="
171− "=>"
172− ">"
173− ">="
174− ">>"
175− ">>="
176− ">>>"
177− ">>>="
178− "~"
179− "^"
180− "&"
181− "|"
182− "^="
183− "&="
184− "|="
185− "&&"
186− "||"
187− "??"
188− "&&="
189− "||="
190− "??="
191− "..."
192−] @operator
193−
194−(ternary_expression ["?" ":"] @operator)
195−
196−[
197− "("
198− ")"
199− "["
200− "]"
201− "{"
202− "}"
203−] @punctuation.bracket
204−
205−[
206− "as"
207− "async"
208− "debugger"
209− "delete"
210− "extends"
211− "from"
212− "function"
213− "get"
214− "in"
215− "instanceof"
216− "new"
217− "of"
218− "set"
219− "static"
220− "target"
221− "try"
222− "typeof"
223− "void"
224− "with"
225−] @keyword
226−
227−[
228− "class"
229− "let"
230− "const"
231− "var"
232−] @keyword.storage.type
233−
234−[
235− "switch"
236− "case"
237− "default"
238− "if"
239− "else"
240− "yield"
241− "throw"
242− "finally"
243− "return"
244− "catch"
245− "continue"
246− "while"
247− "break"
248− "for"
249− "do"
250− "await"
251−] @keyword.control
252−
253−[
254− "import"
255− "export"
256−] @keyword.control.import
257−
38+; inherits: ecma