PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.13.0
Code Block Pro – Beautiful Syntax Highlighting v1.13.0
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / languages / javascript.tmLanguage.json

javascript.tmLanguage.json in Code Block Pro – Beautiful Syntax Highlighting 1.13.0, at build/shiki/languages/javascript.tmLanguage.json

5,915 lines 240.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "information_for_contributors": [
3 "This file has been converted from https://github.com/microsoft/TypeScript-TmLanguage/blob/master/TypeScriptReact.tmLanguage",
4 "If you want to provide a fix or improvement, please create a pull request against the original repository.",
5 "Once accepted there, we are happy to receive an update request."
6 ],
7 "version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/359e091c0a83a45e20aefc13111ed4a19e201f97",
8 "name": "javascript",
9 "scopeName": "source.js",
10 "patterns": [
11 {
12 "include": "#directives"
13 },
14 {
15 "include": "#statements"
16 },
17 {
18 "include": "#shebang"
19 }
20 ],
21 "repository": {
22 "shebang": {
23 "name": "comment.line.shebang.js",
24 "match": "\\A(#!).*(?=$)",
25 "captures": {
26 "1": {
27 "name": "punctuation.definition.comment.js"
28 }
29 }
30 },
31 "statements": {
32 "patterns": [
33 {
34 "include": "#declaration"
35 },
36 {
37 "include": "#control-statement"
38 },
39 {
40 "include": "#after-operator-block-as-object-literal"
41 },
42 {
43 "include": "#decl-block"
44 },
45 {
46 "include": "#label"
47 },
48 {
49 "include": "#expression"
50 },
51 {
52 "include": "#punctuation-semicolon"
53 },
54 {
55 "include": "#string"
56 },
57 {
58 "include": "#comment"
59 }
60 ]
61 },
62 "declaration": {
63 "patterns": [
64 {
65 "include": "#decorator"
66 },
67 {
68 "include": "#var-expr"
69 },
70 {
71 "include": "#function-declaration"
72 },
73 {
74 "include": "#class-declaration"
75 },
76 {
77 "include": "#interface-declaration"
78 },
79 {
80 "include": "#enum-declaration"
81 },
82 {
83 "include": "#namespace-declaration"
84 },
85 {
86 "include": "#type-alias-declaration"
87 },
88 {
89 "include": "#import-equals-declaration"
90 },
91 {
92 "include": "#import-declaration"
93 },
94 {
95 "include": "#export-declaration"
96 },
97 {
98 "name": "storage.modifier.js",
99 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(declare|export)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
100 }
101 ]
102 },
103 "control-statement": {
104 "patterns": [
105 {
106 "include": "#switch-statement"
107 },
108 {
109 "include": "#for-loop"
110 },
111 {
112 "name": "keyword.control.trycatch.js",
113 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(catch|finally|throw|try)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
114 },
115 {
116 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|goto)\\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
117 "captures": {
118 "1": {
119 "name": "keyword.control.loop.js"
120 },
121 "2": {
122 "name": "entity.name.label.js"
123 }
124 }
125 },
126 {
127 "name": "keyword.control.loop.js",
128 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
129 },
130 {
131 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(return)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
132 "beginCaptures": {
133 "0": {
134 "name": "keyword.control.flow.js"
135 }
136 },
137 "end": "(?=[;}]|$|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
138 "patterns": [
139 {
140 "include": "#expression"
141 }
142 ]
143 },
144 {
145 "name": "keyword.control.switch.js",
146 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
147 },
148 {
149 "include": "#if-statement"
150 },
151 {
152 "name": "keyword.control.conditional.js",
153 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(else|if)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
154 },
155 {
156 "name": "keyword.control.with.js",
157 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(with)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
158 },
159 {
160 "name": "keyword.control.js",
161 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(package)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
162 },
163 {
164 "name": "keyword.other.debugger.js",
165 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(debugger)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
166 }
167 ]
168 },
169 "label": {
170 "patterns": [
171 {
172 "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)(?=\\s*\\{)",
173 "beginCaptures": {
174 "1": {
175 "name": "entity.name.label.js"
176 },
177 "2": {
178 "name": "punctuation.separator.label.js"
179 }
180 },
181 "end": "(?<=\\})",
182 "patterns": [
183 {
184 "include": "#decl-block"
185 }
186 ]
187 },
188 {
189 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)",
190 "captures": {
191 "1": {
192 "name": "entity.name.label.js"
193 },
194 "2": {
195 "name": "punctuation.separator.label.js"
196 }
197 }
198 }
199 ]
200 },
201 "expression": {
202 "patterns": [
203 {
204 "include": "#expressionWithoutIdentifiers"
205 },
206 {
207 "include": "#identifiers"
208 },
209 {
210 "include": "#expressionPunctuations"
211 }
212 ]
213 },
214 "expressionWithoutIdentifiers": {
215 "patterns": [
216 {
217 "include": "#jsx"
218 },
219 {
220 "include": "#string"
221 },
222 {
223 "include": "#regex"
224 },
225 {
226 "include": "#comment"
227 },
228 {
229 "include": "#function-expression"
230 },
231 {
232 "include": "#class-expression"
233 },
234 {
235 "include": "#arrow-function"
236 },
237 {
238 "include": "#paren-expression-possibly-arrow"
239 },
240 {
241 "include": "#cast"
242 },
243 {
244 "include": "#ternary-expression"
245 },
246 {
247 "include": "#new-expr"
248 },
249 {
250 "include": "#instanceof-expr"
251 },
252 {
253 "include": "#object-literal"
254 },
255 {
256 "include": "#expression-operators"
257 },
258 {
259 "include": "#function-call"
260 },
261 {
262 "include": "#literal"
263 },
264 {
265 "include": "#support-objects"
266 },
267 {
268 "include": "#paren-expression"
269 }
270 ]
271 },
272 "expressionPunctuations": {
273 "patterns": [
274 {
275 "include": "#punctuation-comma"
276 },
277 {
278 "include": "#punctuation-accessor"
279 }
280 ]
281 },
282 "decorator": {
283 "name": "meta.decorator.js",
284 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))\\@",
285 "beginCaptures": {
286 "0": {
287 "name": "punctuation.decorator.js"
288 }
289 },
290 "end": "(?=\\s)",
291 "patterns": [
292 {
293 "include": "#expression"
294 }
295 ]
296 },
297 "var-expr": {
298 "patterns": [
299 {
300 "name": "meta.var.expr.js",
301 "begin": "(?=(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))",
302 "end": "(?!(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))|((?<!^let|[^\\._$[:alnum:]]let|^var|[^\\._$[:alnum:]]var)(?=\\s*$)))",
303 "patterns": [
304 {
305 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
306 "beginCaptures": {
307 "1": {
308 "name": "keyword.control.export.js"
309 },
310 "2": {
311 "name": "storage.modifier.js"
312 },
313 "3": {
314 "name": "storage.type.js"
315 }
316 },
317 "end": "(?=\\S)"
318 },
319 {
320 "include": "#destructuring-variable"
321 },
322 {
323 "include": "#var-single-variable"
324 },
325 {
326 "include": "#variable-initializer"
327 },
328 {
329 "include": "#comment"
330 },
331 {
332 "begin": "(,)\\s*((?!\\S)|(?=\\/\\/))",
333 "beginCaptures": {
334 "1": {
335 "name": "punctuation.separator.comma.js"
336 }
337 },
338 "end": "(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))",
339 "patterns": [
340 {
341 "include": "#single-line-comment-consuming-line-ending"
342 },
343 {
344 "include": "#comment"
345 },
346 {
347 "include": "#destructuring-variable"
348 },
349 {
350 "include": "#var-single-variable"
351 },
352 {
353 "include": "#punctuation-comma"
354 }
355 ]
356 },
357 {
358 "include": "#punctuation-comma"
359 }
360 ]
361 },
362 {
363 "name": "meta.var.expr.js",
364 "begin": "(?=(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))",
365 "beginCaptures": {
366 "1": {
367 "name": "keyword.control.export.js"
368 },
369 "2": {
370 "name": "storage.modifier.js"
371 },
372 "3": {
373 "name": "storage.type.js"
374 }
375 },
376 "end": "(?!(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))|((?<!^const|[^\\._$[:alnum:]]const)(?=\\s*$)))",
377 "patterns": [
378 {
379 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
380 "beginCaptures": {
381 "1": {
382 "name": "keyword.control.export.js"
383 },
384 "2": {
385 "name": "storage.modifier.js"
386 },
387 "3": {
388 "name": "storage.type.js"
389 }
390 },
391 "end": "(?=\\S)"
392 },
393 {
394 "include": "#destructuring-const"
395 },
396 {
397 "include": "#var-single-const"
398 },
399 {
400 "include": "#variable-initializer"
401 },
402 {
403 "include": "#comment"
404 },
405 {
406 "begin": "(,)\\s*((?!\\S)|(?=\\/\\/))",
407 "beginCaptures": {
408 "1": {
409 "name": "punctuation.separator.comma.js"
410 }
411 },
412 "end": "(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))",
413 "patterns": [
414 {
415 "include": "#single-line-comment-consuming-line-ending"
416 },
417 {
418 "include": "#comment"
419 },
420 {
421 "include": "#destructuring-const"
422 },
423 {
424 "include": "#var-single-const"
425 },
426 {
427 "include": "#punctuation-comma"
428 }
429 ]
430 },
431 {
432 "include": "#punctuation-comma"
433 }
434 ]
435 }
436 ]
437 },
438 "var-single-variable": {
439 "patterns": [
440 {
441 "name": "meta.var-single-variable.expr.js",
442 "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\!)?(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
443 "beginCaptures": {
444 "1": {
445 "name": "meta.definition.variable.js entity.name.function.js"
446 },
447 "2": {
448 "name": "keyword.operator.definiteassignment.js"
449 }
450 },
451 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
452 "patterns": [
453 {
454 "include": "#var-single-variable-type-annotation"
455 }
456 ]
457 },
458 {
459 "name": "meta.var-single-variable.expr.js",
460 "begin": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])(\\!)?",
461 "beginCaptures": {
462 "1": {
463 "name": "meta.definition.variable.js variable.other.constant.js"
464 },
465 "2": {
466 "name": "keyword.operator.definiteassignment.js"
467 }
468 },
469 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
470 "patterns": [
471 {
472 "include": "#var-single-variable-type-annotation"
473 }
474 ]
475 },
476 {
477 "name": "meta.var-single-variable.expr.js",
478 "begin": "([_$[:alpha:]][_$[:alnum:]]*)(\\!)?",
479 "beginCaptures": {
480 "1": {
481 "name": "meta.definition.variable.js variable.other.readwrite.js"
482 },
483 "2": {
484 "name": "keyword.operator.definiteassignment.js"
485 }
486 },
487 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
488 "patterns": [
489 {
490 "include": "#var-single-variable-type-annotation"
491 }
492 ]
493 }
494 ]
495 },
496 "var-single-const": {
497 "patterns": [
498 {
499 "name": "meta.var-single-variable.expr.js",
500 "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
501 "beginCaptures": {
502 "1": {
503 "name": "meta.definition.variable.js variable.other.constant.js entity.name.function.js"
504 }
505 },
506 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
507 "patterns": [
508 {
509 "include": "#var-single-variable-type-annotation"
510 }
511 ]
512 },
513 {
514 "name": "meta.var-single-variable.expr.js",
515 "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
516 "beginCaptures": {
517 "1": {
518 "name": "meta.definition.variable.js variable.other.constant.js"
519 }
520 },
521 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
522 "patterns": [
523 {
524 "include": "#var-single-variable-type-annotation"
525 }
526 ]
527 }
528 ]
529 },
530 "var-single-variable-type-annotation": {
531 "patterns": [
532 {
533 "include": "#type-annotation"
534 },
535 {
536 "include": "#string"
537 },
538 {
539 "include": "#comment"
540 }
541 ]
542 },
543 "destructuring-variable": {
544 "patterns": [
545 {
546 "name": "meta.object-binding-pattern-variable.js",
547 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)",
548 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
549 "patterns": [
550 {
551 "include": "#object-binding-pattern"
552 },
553 {
554 "include": "#type-annotation"
555 },
556 {
557 "include": "#comment"
558 }
559 ]
560 },
561 {
562 "name": "meta.array-binding-pattern-variable.js",
563 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)",
564 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
565 "patterns": [
566 {
567 "include": "#array-binding-pattern"
568 },
569 {
570 "include": "#type-annotation"
571 },
572 {
573 "include": "#comment"
574 }
575 ]
576 }
577 ]
578 },
579 "destructuring-const": {
580 "patterns": [
581 {
582 "name": "meta.object-binding-pattern-variable.js",
583 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)",
584 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
585 "patterns": [
586 {
587 "include": "#object-binding-pattern-const"
588 },
589 {
590 "include": "#type-annotation"
591 },
592 {
593 "include": "#comment"
594 }
595 ]
596 },
597 {
598 "name": "meta.array-binding-pattern-variable.js",
599 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)",
600 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
601 "patterns": [
602 {
603 "include": "#array-binding-pattern-const"
604 },
605 {
606 "include": "#type-annotation"
607 },
608 {
609 "include": "#comment"
610 }
611 ]
612 }
613 ]
614 },
615 "object-binding-element": {
616 "patterns": [
617 {
618 "include": "#comment"
619 },
620 {
621 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
622 "end": "(?=,|\\})",
623 "patterns": [
624 {
625 "include": "#object-binding-element-propertyName"
626 },
627 {
628 "include": "#binding-element"
629 }
630 ]
631 },
632 {
633 "include": "#object-binding-pattern"
634 },
635 {
636 "include": "#destructuring-variable-rest"
637 },
638 {
639 "include": "#variable-initializer"
640 },
641 {
642 "include": "#punctuation-comma"
643 }
644 ]
645 },
646 "object-binding-element-const": {
647 "patterns": [
648 {
649 "include": "#comment"
650 },
651 {
652 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
653 "end": "(?=,|\\})",
654 "patterns": [
655 {
656 "include": "#object-binding-element-propertyName"
657 },
658 {
659 "include": "#binding-element-const"
660 }
661 ]
662 },
663 {
664 "include": "#object-binding-pattern-const"
665 },
666 {
667 "include": "#destructuring-variable-rest-const"
668 },
669 {
670 "include": "#variable-initializer"
671 },
672 {
673 "include": "#punctuation-comma"
674 }
675 ]
676 },
677 "object-binding-element-propertyName": {
678 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
679 "end": "(:)",
680 "endCaptures": {
681 "0": {
682 "name": "punctuation.destructuring.js"
683 }
684 },
685 "patterns": [
686 {
687 "include": "#string"
688 },
689 {
690 "include": "#array-literal"
691 },
692 {
693 "include": "#numeric-literal"
694 },
695 {
696 "name": "variable.object.property.js",
697 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
698 }
699 ]
700 },
701 "binding-element": {
702 "patterns": [
703 {
704 "include": "#comment"
705 },
706 {
707 "include": "#string"
708 },
709 {
710 "include": "#numeric-literal"
711 },
712 {
713 "include": "#regex"
714 },
715 {
716 "include": "#object-binding-pattern"
717 },
718 {
719 "include": "#array-binding-pattern"
720 },
721 {
722 "include": "#destructuring-variable-rest"
723 },
724 {
725 "include": "#variable-initializer"
726 }
727 ]
728 },
729 "binding-element-const": {
730 "patterns": [
731 {
732 "include": "#comment"
733 },
734 {
735 "include": "#string"
736 },
737 {
738 "include": "#numeric-literal"
739 },
740 {
741 "include": "#regex"
742 },
743 {
744 "include": "#object-binding-pattern-const"
745 },
746 {
747 "include": "#array-binding-pattern-const"
748 },
749 {
750 "include": "#destructuring-variable-rest-const"
751 },
752 {
753 "include": "#variable-initializer"
754 }
755 ]
756 },
757 "destructuring-variable-rest": {
758 "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
759 "captures": {
760 "1": {
761 "name": "keyword.operator.rest.js"
762 },
763 "2": {
764 "name": "meta.definition.variable.js variable.other.readwrite.js"
765 }
766 }
767 },
768 "destructuring-variable-rest-const": {
769 "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
770 "captures": {
771 "1": {
772 "name": "keyword.operator.rest.js"
773 },
774 "2": {
775 "name": "meta.definition.variable.js variable.other.constant.js"
776 }
777 }
778 },
779 "object-binding-pattern": {
780 "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
781 "beginCaptures": {
782 "1": {
783 "name": "keyword.operator.rest.js"
784 },
785 "2": {
786 "name": "punctuation.definition.binding-pattern.object.js"
787 }
788 },
789 "end": "\\}",
790 "endCaptures": {
791 "0": {
792 "name": "punctuation.definition.binding-pattern.object.js"
793 }
794 },
795 "patterns": [
796 {
797 "include": "#object-binding-element"
798 }
799 ]
800 },
801 "object-binding-pattern-const": {
802 "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
803 "beginCaptures": {
804 "1": {
805 "name": "keyword.operator.rest.js"
806 },
807 "2": {
808 "name": "punctuation.definition.binding-pattern.object.js"
809 }
810 },
811 "end": "\\}",
812 "endCaptures": {
813 "0": {
814 "name": "punctuation.definition.binding-pattern.object.js"
815 }
816 },
817 "patterns": [
818 {
819 "include": "#object-binding-element-const"
820 }
821 ]
822 },
823 "array-binding-pattern": {
824 "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
825 "beginCaptures": {
826 "1": {
827 "name": "keyword.operator.rest.js"
828 },
829 "2": {
830 "name": "punctuation.definition.binding-pattern.array.js"
831 }
832 },
833 "end": "\\]",
834 "endCaptures": {
835 "0": {
836 "name": "punctuation.definition.binding-pattern.array.js"
837 }
838 },
839 "patterns": [
840 {
841 "include": "#binding-element"
842 },
843 {
844 "include": "#punctuation-comma"
845 }
846 ]
847 },
848 "array-binding-pattern-const": {
849 "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
850 "beginCaptures": {
851 "1": {
852 "name": "keyword.operator.rest.js"
853 },
854 "2": {
855 "name": "punctuation.definition.binding-pattern.array.js"
856 }
857 },
858 "end": "\\]",
859 "endCaptures": {
860 "0": {
861 "name": "punctuation.definition.binding-pattern.array.js"
862 }
863 },
864 "patterns": [
865 {
866 "include": "#binding-element-const"
867 },
868 {
869 "include": "#punctuation-comma"
870 }
871 ]
872 },
873 "parameter-name": {
874 "patterns": [
875 {
876 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)",
877 "captures": {
878 "1": {
879 "name": "storage.modifier.js"
880 }
881 }
882 },
883 {
884 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
885 "captures": {
886 "1": {
887 "name": "storage.modifier.js"
888 },
889 "2": {
890 "name": "keyword.operator.rest.js"
891 },
892 "3": {
893 "name": "entity.name.function.js variable.language.this.js"
894 },
895 "4": {
896 "name": "entity.name.function.js"
897 },
898 "5": {
899 "name": "keyword.operator.optional.js"
900 }
901 }
902 },
903 {
904 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)",
905 "captures": {
906 "1": {
907 "name": "storage.modifier.js"
908 },
909 "2": {
910 "name": "keyword.operator.rest.js"
911 },
912 "3": {
913 "name": "variable.parameter.js variable.language.this.js"
914 },
915 "4": {
916 "name": "variable.parameter.js"
917 },
918 "5": {
919 "name": "keyword.operator.optional.js"
920 }
921 }
922 }
923 ]
924 },
925 "destructuring-parameter": {
926 "patterns": [
927 {
928 "name": "meta.parameter.object-binding-pattern.js",
929 "begin": "(?<!=|:)\\s*(?:(\\.\\.\\.)\\s*)?(\\{)",
930 "beginCaptures": {
931 "1": {
932 "name": "keyword.operator.rest.js"
933 },
934 "2": {
935 "name": "punctuation.definition.binding-pattern.object.js"
936 }
937 },
938 "end": "\\}",
939 "endCaptures": {
940 "0": {
941 "name": "punctuation.definition.binding-pattern.object.js"
942 }
943 },
944 "patterns": [
945 {
946 "include": "#parameter-object-binding-element"
947 }
948 ]
949 },
950 {
951 "name": "meta.paramter.array-binding-pattern.js",
952 "begin": "(?<!=|:)\\s*(?:(\\.\\.\\.)\\s*)?(\\[)",
953 "beginCaptures": {
954 "1": {
955 "name": "keyword.operator.rest.js"
956 },
957 "2": {
958 "name": "punctuation.definition.binding-pattern.array.js"
959 }
960 },
961 "end": "\\]",
962 "endCaptures": {
963 "0": {
964 "name": "punctuation.definition.binding-pattern.array.js"
965 }
966 },
967 "patterns": [
968 {
969 "include": "#parameter-binding-element"
970 },
971 {
972 "include": "#punctuation-comma"
973 }
974 ]
975 }
976 ]
977 },
978 "parameter-object-binding-element": {
979 "patterns": [
980 {
981 "include": "#comment"
982 },
983 {
984 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
985 "end": "(?=,|\\})",
986 "patterns": [
987 {
988 "include": "#object-binding-element-propertyName"
989 },
990 {
991 "include": "#parameter-binding-element"
992 }
993 ]
994 },
995 {
996 "include": "#parameter-object-binding-pattern"
997 },
998 {
999 "include": "#destructuring-parameter-rest"
1000 },
1001 {
1002 "include": "#variable-initializer"
1003 },
1004 {
1005 "include": "#punctuation-comma"
1006 }
1007 ]
1008 },
1009 "parameter-binding-element": {
1010 "patterns": [
1011 {
1012 "include": "#comment"
1013 },
1014 {
1015 "include": "#string"
1016 },
1017 {
1018 "include": "#numeric-literal"
1019 },
1020 {
1021 "include": "#regex"
1022 },
1023 {
1024 "include": "#parameter-object-binding-pattern"
1025 },
1026 {
1027 "include": "#parameter-array-binding-pattern"
1028 },
1029 {
1030 "include": "#destructuring-parameter-rest"
1031 },
1032 {
1033 "include": "#variable-initializer"
1034 }
1035 ]
1036 },
1037 "destructuring-parameter-rest": {
1038 "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
1039 "captures": {
1040 "1": {
1041 "name": "keyword.operator.rest.js"
1042 },
1043 "2": {
1044 "name": "variable.parameter.js"
1045 }
1046 }
1047 },
1048 "parameter-object-binding-pattern": {
1049 "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
1050 "beginCaptures": {
1051 "1": {
1052 "name": "keyword.operator.rest.js"
1053 },
1054 "2": {
1055 "name": "punctuation.definition.binding-pattern.object.js"
1056 }
1057 },
1058 "end": "\\}",
1059 "endCaptures": {
1060 "0": {
1061 "name": "punctuation.definition.binding-pattern.object.js"
1062 }
1063 },
1064 "patterns": [
1065 {
1066 "include": "#parameter-object-binding-element"
1067 }
1068 ]
1069 },
1070 "parameter-array-binding-pattern": {
1071 "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
1072 "beginCaptures": {
1073 "1": {
1074 "name": "keyword.operator.rest.js"
1075 },
1076 "2": {
1077 "name": "punctuation.definition.binding-pattern.array.js"
1078 }
1079 },
1080 "end": "\\]",
1081 "endCaptures": {
1082 "0": {
1083 "name": "punctuation.definition.binding-pattern.array.js"
1084 }
1085 },
1086 "patterns": [
1087 {
1088 "include": "#parameter-binding-element"
1089 },
1090 {
1091 "include": "#punctuation-comma"
1092 }
1093 ]
1094 },
1095 "field-declaration": {
1096 "name": "meta.field.declaration.js",
1097 "begin": "(?x)(?<!\\()(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s+)?(?=\\s*((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|(\\#?[_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(?:(?:(\\?)|(\\!))\\s*)?(=|:|;|,|\\}|$))",
1098 "beginCaptures": {
1099 "1": {
1100 "name": "storage.modifier.js"
1101 }
1102 },
1103 "end": "(?x)(?=\\}|;|,|$|(^(?!\\s*((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|(\\#?[_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(?:(?:(\\?)|(\\!))\\s*)?(=|:|;|,|$))))|(?<=\\})",
1104 "patterns": [
1105 {
1106 "include": "#variable-initializer"
1107 },
1108 {
1109 "include": "#type-annotation"
1110 },
1111 {
1112 "include": "#string"
1113 },
1114 {
1115 "include": "#array-literal"
1116 },
1117 {
1118 "include": "#numeric-literal"
1119 },
1120 {
1121 "include": "#comment"
1122 },
1123 {
1124 "match": "(?x)(\\#?[_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
1125 "captures": {
1126 "1": {
1127 "name": "meta.definition.property.js entity.name.function.js"
1128 },
1129 "2": {
1130 "name": "keyword.operator.optional.js"
1131 },
1132 "3": {
1133 "name": "keyword.operator.definiteassignment.js"
1134 }
1135 }
1136 },
1137 {
1138 "name": "meta.definition.property.js variable.object.property.js",
1139 "match": "\\#?[_$[:alpha:]][_$[:alnum:]]*"
1140 },
1141 {
1142 "name": "keyword.operator.optional.js",
1143 "match": "\\?"
1144 },
1145 {
1146 "name": "keyword.operator.definiteassignment.js",
1147 "match": "\\!"
1148 }
1149 ]
1150 },
1151 "variable-initializer": {
1152 "patterns": [
1153 {
1154 "begin": "(?<!=|!)(=)(?!=)(?=\\s*\\S)(?!\\s*.*=>\\s*$)",
1155 "beginCaptures": {
1156 "1": {
1157 "name": "keyword.operator.assignment.js"
1158 }
1159 },
1160 "end": "(?=$|^|[,);}\\]]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
1161 "patterns": [
1162 {
1163 "include": "#expression"
1164 }
1165 ]
1166 },
1167 {
1168 "begin": "(?<!=|!)(=)(?!=)",
1169 "beginCaptures": {
1170 "1": {
1171 "name": "keyword.operator.assignment.js"
1172 }
1173 },
1174 "end": "(?=[,);}\\]]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))|(?=^\\s*$)|(?<=\\S)(?<!=)(?=\\s*$)",
1175 "patterns": [
1176 {
1177 "include": "#expression"
1178 }
1179 ]
1180 }
1181 ]
1182 },
1183 "function-declaration": {
1184 "name": "meta.function.js",
1185 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
1186 "beginCaptures": {
1187 "1": {
1188 "name": "keyword.control.export.js"
1189 },
1190 "2": {
1191 "name": "storage.modifier.js"
1192 },
1193 "3": {
1194 "name": "storage.modifier.async.js"
1195 },
1196 "4": {
1197 "name": "storage.type.function.js"
1198 },
1199 "5": {
1200 "name": "keyword.generator.asterisk.js"
1201 },
1202 "6": {
1203 "name": "meta.definition.function.js entity.name.function.js"
1204 }
1205 },
1206 "end": "(?=;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))|(?<=\\})",
1207 "patterns": [
1208 {
1209 "include": "#function-name"
1210 },
1211 {
1212 "include": "#function-body"
1213 }
1214 ]
1215 },
1216 "function-expression": {
1217 "name": "meta.function.expression.js",
1218 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
1219 "beginCaptures": {
1220 "1": {
1221 "name": "storage.modifier.async.js"
1222 },
1223 "2": {
1224 "name": "storage.type.function.js"
1225 },
1226 "3": {
1227 "name": "keyword.generator.asterisk.js"
1228 },
1229 "4": {
1230 "name": "meta.definition.function.js entity.name.function.js"
1231 }
1232 },
1233 "end": "(?=;)|(?<=\\})",
1234 "patterns": [
1235 {
1236 "include": "#function-name"
1237 },
1238 {
1239 "include": "#single-line-comment-consuming-line-ending"
1240 },
1241 {
1242 "include": "#function-body"
1243 }
1244 ]
1245 },
1246 "function-name": {
1247 "name": "meta.definition.function.js entity.name.function.js",
1248 "match": "[_$[:alpha:]][_$[:alnum:]]*"
1249 },
1250 "function-body": {
1251 "patterns": [
1252 {
1253 "include": "#comment"
1254 },
1255 {
1256 "include": "#type-parameters"
1257 },
1258 {
1259 "include": "#function-parameters"
1260 },
1261 {
1262 "include": "#return-type"
1263 },
1264 {
1265 "include": "#type-function-return-type"
1266 },
1267 {
1268 "include": "#decl-block"
1269 },
1270 {
1271 "name": "keyword.generator.asterisk.js",
1272 "match": "\\*"
1273 }
1274 ]
1275 },
1276 "method-declaration": {
1277 "patterns": [
1278 {
1279 "name": "meta.method.declaration.js",
1280 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?\\s*\\b(constructor)\\b(?!:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1281 "beginCaptures": {
1282 "1": {
1283 "name": "storage.modifier.js"
1284 },
1285 "2": {
1286 "name": "storage.modifier.js"
1287 },
1288 "3": {
1289 "name": "storage.modifier.js"
1290 },
1291 "4": {
1292 "name": "storage.modifier.async.js"
1293 },
1294 "5": {
1295 "name": "storage.type.js"
1296 }
1297 },
1298 "end": "(?=\\}|;|,|$)|(?<=\\})",
1299 "patterns": [
1300 {
1301 "include": "#method-declaration-name"
1302 },
1303 {
1304 "include": "#function-body"
1305 }
1306 ]
1307 },
1308 {
1309 "name": "meta.method.declaration.js",
1310 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:(?:\\s*\\b(new)\\b(?!:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(?:(\\*)\\s*)?)(?=\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])",
1311 "beginCaptures": {
1312 "1": {
1313 "name": "storage.modifier.js"
1314 },
1315 "2": {
1316 "name": "storage.modifier.js"
1317 },
1318 "3": {
1319 "name": "storage.modifier.js"
1320 },
1321 "4": {
1322 "name": "storage.modifier.async.js"
1323 },
1324 "5": {
1325 "name": "keyword.operator.new.js"
1326 },
1327 "6": {
1328 "name": "keyword.generator.asterisk.js"
1329 }
1330 },
1331 "end": "(?=\\}|;|,|$)|(?<=\\})",
1332 "patterns": [
1333 {
1334 "include": "#method-declaration-name"
1335 },
1336 {
1337 "include": "#function-body"
1338 }
1339 ]
1340 },
1341 {
1342 "name": "meta.method.declaration.js",
1343 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])",
1344 "beginCaptures": {
1345 "1": {
1346 "name": "storage.modifier.js"
1347 },
1348 "2": {
1349 "name": "storage.modifier.js"
1350 },
1351 "3": {
1352 "name": "storage.modifier.js"
1353 },
1354 "4": {
1355 "name": "storage.modifier.async.js"
1356 },
1357 "5": {
1358 "name": "storage.type.property.js"
1359 },
1360 "6": {
1361 "name": "keyword.generator.asterisk.js"
1362 }
1363 },
1364 "end": "(?=\\}|;|,|$)|(?<=\\})",
1365 "patterns": [
1366 {
1367 "include": "#method-declaration-name"
1368 },
1369 {
1370 "include": "#function-body"
1371 }
1372 ]
1373 }
1374 ]
1375 },
1376 "object-literal-method-declaration": {
1377 "name": "meta.method.declaration.js",
1378 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])",
1379 "beginCaptures": {
1380 "1": {
1381 "name": "storage.modifier.async.js"
1382 },
1383 "2": {
1384 "name": "storage.type.property.js"
1385 },
1386 "3": {
1387 "name": "keyword.generator.asterisk.js"
1388 }
1389 },
1390 "end": "(?=\\}|;|,)|(?<=\\})",
1391 "patterns": [
1392 {
1393 "include": "#method-declaration-name"
1394 },
1395 {
1396 "include": "#function-body"
1397 },
1398 {
1399 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])",
1400 "beginCaptures": {
1401 "1": {
1402 "name": "storage.modifier.async.js"
1403 },
1404 "2": {
1405 "name": "storage.type.property.js"
1406 },
1407 "3": {
1408 "name": "keyword.generator.asterisk.js"
1409 }
1410 },
1411 "end": "(?=\\(|\\<)",
1412 "patterns": [
1413 {
1414 "include": "#method-declaration-name"
1415 }
1416 ]
1417 }
1418 ]
1419 },
1420 "method-declaration-name": {
1421 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\<])",
1422 "end": "(?=\\(|\\<)",
1423 "patterns": [
1424 {
1425 "include": "#string"
1426 },
1427 {
1428 "include": "#array-literal"
1429 },
1430 {
1431 "include": "#numeric-literal"
1432 },
1433 {
1434 "name": "meta.definition.method.js entity.name.function.js",
1435 "match": "[_$[:alpha:]][_$[:alnum:]]*"
1436 },
1437 {
1438 "name": "keyword.operator.optional.js",
1439 "match": "\\?"
1440 }
1441 ]
1442 },
1443 "arrow-function": {
1444 "patterns": [
1445 {
1446 "name": "meta.arrow.js",
1447 "match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?==>)",
1448 "captures": {
1449 "1": {
1450 "name": "storage.modifier.async.js"
1451 },
1452 "2": {
1453 "name": "variable.parameter.js"
1454 }
1455 }
1456 },
1457 {
1458 "name": "meta.arrow.js",
1459 "begin": "(?x) (?:\n (?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\n)? ((?<![})!\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)",
1460 "beginCaptures": {
1461 "1": {
1462 "name": "storage.modifier.async.js"
1463 }
1464 },
1465 "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
1466 "patterns": [
1467 {
1468 "include": "#comment"
1469 },
1470 {
1471 "include": "#type-parameters"
1472 },
1473 {
1474 "include": "#function-parameters"
1475 },
1476 {
1477 "include": "#arrow-return-type"
1478 },
1479 {
1480 "include": "#possibly-arrow-return-type"
1481 }
1482 ]
1483 },
1484 {
1485 "name": "meta.arrow.js",
1486 "begin": "=>",
1487 "beginCaptures": {
1488 "0": {
1489 "name": "storage.type.function.arrow.js"
1490 }
1491 },
1492 "end": "((?<=\\}|\\S)(?<!=>)|((?!\\{)(?=\\S)))(?!\\/[\\/\\*])",
1493 "patterns": [
1494 {
1495 "include": "#single-line-comment-consuming-line-ending"
1496 },
1497 {
1498 "include": "#decl-block"
1499 },
1500 {
1501 "include": "#expression"
1502 }
1503 ]
1504 }
1505 ]
1506 },
1507 "indexer-declaration": {
1508 "name": "meta.indexer.declaration.js",
1509 "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s*)?\\s*(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)",
1510 "beginCaptures": {
1511 "1": {
1512 "name": "storage.modifier.js"
1513 },
1514 "2": {
1515 "name": "meta.brace.square.js"
1516 },
1517 "3": {
1518 "name": "variable.parameter.js"
1519 }
1520 },
1521 "end": "(\\])\\s*(\\?\\s*)?|$",
1522 "endCaptures": {
1523 "1": {
1524 "name": "meta.brace.square.js"
1525 },
1526 "2": {
1527 "name": "keyword.operator.optional.js"
1528 }
1529 },
1530 "patterns": [
1531 {
1532 "include": "#type-annotation"
1533 }
1534 ]
1535 },
1536 "indexer-mapped-type-declaration": {
1537 "name": "meta.indexer.mappedtype.declaration.js",
1538 "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([+-])?(readonly)\\s*)?\\s*(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s+(in)\\s+",
1539 "beginCaptures": {
1540 "1": {
1541 "name": "keyword.operator.type.modifier.js"
1542 },
1543 "2": {
1544 "name": "storage.modifier.js"
1545 },
1546 "3": {
1547 "name": "meta.brace.square.js"
1548 },
1549 "4": {
1550 "name": "entity.name.type.js"
1551 },
1552 "5": {
1553 "name": "keyword.operator.expression.in.js"
1554 }
1555 },
1556 "end": "(\\])([+-])?\\s*(\\?\\s*)?|$",
1557 "endCaptures": {
1558 "1": {
1559 "name": "meta.brace.square.js"
1560 },
1561 "2": {
1562 "name": "keyword.operator.type.modifier.js"
1563 },
1564 "3": {
1565 "name": "keyword.operator.optional.js"
1566 }
1567 },
1568 "patterns": [
1569 {
1570 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+",
1571 "captures": {
1572 "1": {
1573 "name": "keyword.control.as.js"
1574 }
1575 }
1576 },
1577 {
1578 "include": "#type"
1579 }
1580 ]
1581 },
1582 "function-parameters": {
1583 "name": "meta.parameters.js",
1584 "begin": "\\(",
1585 "beginCaptures": {
1586 "0": {
1587 "name": "punctuation.definition.parameters.begin.js"
1588 }
1589 },
1590 "end": "\\)",
1591 "endCaptures": {
1592 "0": {
1593 "name": "punctuation.definition.parameters.end.js"
1594 }
1595 },
1596 "patterns": [
1597 {
1598 "include": "#function-parameters-body"
1599 }
1600 ]
1601 },
1602 "function-parameters-body": {
1603 "patterns": [
1604 {
1605 "include": "#comment"
1606 },
1607 {
1608 "include": "#string"
1609 },
1610 {
1611 "include": "#decorator"
1612 },
1613 {
1614 "include": "#destructuring-parameter"
1615 },
1616 {
1617 "include": "#parameter-name"
1618 },
1619 {
1620 "include": "#parameter-type-annotation"
1621 },
1622 {
1623 "include": "#variable-initializer"
1624 },
1625 {
1626 "name": "punctuation.separator.parameter.js",
1627 "match": ","
1628 }
1629 ]
1630 },
1631 "class-declaration": {
1632 "name": "meta.class.js",
1633 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(?:(abstract)\\s+)?\\b(class)\\b(?=\\s+|/[/*])",
1634 "beginCaptures": {
1635 "1": {
1636 "name": "keyword.control.export.js"
1637 },
1638 "2": {
1639 "name": "storage.modifier.js"
1640 },
1641 "3": {
1642 "name": "storage.modifier.js"
1643 },
1644 "4": {
1645 "name": "storage.type.class.js"
1646 }
1647 },
1648 "end": "(?<=\\})",
1649 "patterns": [
1650 {
1651 "include": "#class-declaration-or-expression-patterns"
1652 }
1653 ]
1654 },
1655 "class-expression": {
1656 "name": "meta.class.js",
1657 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(class)\\b(?=\\s+|[<{]|\\/[\\/*])",
1658 "beginCaptures": {
1659 "1": {
1660 "name": "storage.modifier.js"
1661 },
1662 "2": {
1663 "name": "storage.type.class.js"
1664 }
1665 },
1666 "end": "(?<=\\})",
1667 "patterns": [
1668 {
1669 "include": "#class-declaration-or-expression-patterns"
1670 }
1671 ]
1672 },
1673 "class-declaration-or-expression-patterns": {
1674 "patterns": [
1675 {
1676 "include": "#comment"
1677 },
1678 {
1679 "include": "#class-or-interface-heritage"
1680 },
1681 {
1682 "match": "[_$[:alpha:]][_$[:alnum:]]*",
1683 "captures": {
1684 "0": {
1685 "name": "entity.name.type.class.js"
1686 }
1687 }
1688 },
1689 {
1690 "include": "#type-parameters"
1691 },
1692 {
1693 "include": "#class-or-interface-body"
1694 }
1695 ]
1696 },
1697 "interface-declaration": {
1698 "name": "meta.interface.js",
1699 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(?:(abstract)\\s+)?\\b(interface)\\b(?=\\s+|/[/*])",
1700 "beginCaptures": {
1701 "1": {
1702 "name": "keyword.control.export.js"
1703 },
1704 "2": {
1705 "name": "storage.modifier.js"
1706 },
1707 "3": {
1708 "name": "storage.modifier.js"
1709 },
1710 "4": {
1711 "name": "storage.type.interface.js"
1712 }
1713 },
1714 "end": "(?<=\\})",
1715 "patterns": [
1716 {
1717 "include": "#comment"
1718 },
1719 {
1720 "include": "#class-or-interface-heritage"
1721 },
1722 {
1723 "match": "[_$[:alpha:]][_$[:alnum:]]*",
1724 "captures": {
1725 "0": {
1726 "name": "entity.name.type.interface.js"
1727 }
1728 }
1729 },
1730 {
1731 "include": "#type-parameters"
1732 },
1733 {
1734 "include": "#class-or-interface-body"
1735 }
1736 ]
1737 },
1738 "class-or-interface-heritage": {
1739 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(extends|implements)\\b)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1740 "beginCaptures": {
1741 "1": {
1742 "name": "storage.modifier.js"
1743 }
1744 },
1745 "end": "(?=\\{)",
1746 "patterns": [
1747 {
1748 "include": "#comment"
1749 },
1750 {
1751 "include": "#class-or-interface-heritage"
1752 },
1753 {
1754 "include": "#type-parameters"
1755 },
1756 {
1757 "include": "#expressionWithoutIdentifiers"
1758 },
1759 {
1760 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s*\\??\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)*\\s*)",
1761 "captures": {
1762 "1": {
1763 "name": "entity.name.type.module.js"
1764 },
1765 "2": {
1766 "name": "punctuation.accessor.js"
1767 },
1768 "3": {
1769 "name": "punctuation.accessor.optional.js"
1770 }
1771 }
1772 },
1773 {
1774 "match": "([_$[:alpha:]][_$[:alnum:]]*)",
1775 "captures": {
1776 "1": {
1777 "name": "entity.other.inherited-class.js"
1778 }
1779 }
1780 },
1781 {
1782 "include": "#expressionPunctuations"
1783 }
1784 ]
1785 },
1786 "class-or-interface-body": {
1787 "begin": "\\{",
1788 "beginCaptures": {
1789 "0": {
1790 "name": "punctuation.definition.block.js"
1791 }
1792 },
1793 "end": "\\}",
1794 "endCaptures": {
1795 "0": {
1796 "name": "punctuation.definition.block.js"
1797 }
1798 },
1799 "patterns": [
1800 {
1801 "include": "#comment"
1802 },
1803 {
1804 "include": "#decorator"
1805 },
1806 {
1807 "begin": "(?<=:)\\s*",
1808 "end": "(?=\\s|[;),}\\]:\\-\\+]|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
1809 "patterns": [
1810 {
1811 "include": "#expression"
1812 }
1813 ]
1814 },
1815 {
1816 "include": "#method-declaration"
1817 },
1818 {
1819 "include": "#indexer-declaration"
1820 },
1821 {
1822 "include": "#field-declaration"
1823 },
1824 {
1825 "include": "#string"
1826 },
1827 {
1828 "include": "#type-annotation"
1829 },
1830 {
1831 "include": "#variable-initializer"
1832 },
1833 {
1834 "include": "#access-modifier"
1835 },
1836 {
1837 "include": "#property-accessor"
1838 },
1839 {
1840 "include": "#async-modifier"
1841 },
1842 {
1843 "include": "#after-operator-block-as-object-literal"
1844 },
1845 {
1846 "include": "#decl-block"
1847 },
1848 {
1849 "include": "#expression"
1850 },
1851 {
1852 "include": "#punctuation-comma"
1853 },
1854 {
1855 "include": "#punctuation-semicolon"
1856 }
1857 ]
1858 },
1859 "access-modifier": {
1860 "name": "storage.modifier.js",
1861 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|declare|override|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1862 },
1863 "property-accessor": {
1864 "name": "storage.type.property.js",
1865 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(accessor|get|set)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1866 },
1867 "async-modifier": {
1868 "name": "storage.modifier.async.js",
1869 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(async)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1870 },
1871 "enum-declaration": {
1872 "name": "meta.enum.declaration.js",
1873 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
1874 "beginCaptures": {
1875 "1": {
1876 "name": "keyword.control.export.js"
1877 },
1878 "2": {
1879 "name": "storage.modifier.js"
1880 },
1881 "3": {
1882 "name": "storage.modifier.js"
1883 },
1884 "4": {
1885 "name": "storage.type.enum.js"
1886 },
1887 "5": {
1888 "name": "entity.name.type.enum.js"
1889 }
1890 },
1891 "end": "(?<=\\})",
1892 "patterns": [
1893 {
1894 "include": "#comment"
1895 },
1896 {
1897 "begin": "\\{",
1898 "beginCaptures": {
1899 "0": {
1900 "name": "punctuation.definition.block.js"
1901 }
1902 },
1903 "end": "\\}",
1904 "endCaptures": {
1905 "0": {
1906 "name": "punctuation.definition.block.js"
1907 }
1908 },
1909 "patterns": [
1910 {
1911 "include": "#comment"
1912 },
1913 {
1914 "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
1915 "beginCaptures": {
1916 "0": {
1917 "name": "variable.other.enummember.js"
1918 }
1919 },
1920 "end": "(?=,|\\}|$)",
1921 "patterns": [
1922 {
1923 "include": "#comment"
1924 },
1925 {
1926 "include": "#variable-initializer"
1927 }
1928 ]
1929 },
1930 {
1931 "begin": "(?=((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))",
1932 "end": "(?=,|\\}|$)",
1933 "patterns": [
1934 {
1935 "include": "#string"
1936 },
1937 {
1938 "include": "#array-literal"
1939 },
1940 {
1941 "include": "#comment"
1942 },
1943 {
1944 "include": "#variable-initializer"
1945 }
1946 ]
1947 },
1948 {
1949 "include": "#punctuation-comma"
1950 }
1951 ]
1952 }
1953 ]
1954 },
1955 "namespace-declaration": {
1956 "name": "meta.namespace.declaration.js",
1957 "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(namespace|module)\\s+(?=[_$[:alpha:]\"'`]))",
1958 "beginCaptures": {
1959 "1": {
1960 "name": "keyword.control.export.js"
1961 },
1962 "2": {
1963 "name": "storage.modifier.js"
1964 },
1965 "3": {
1966 "name": "storage.type.namespace.js"
1967 }
1968 },
1969 "end": "(?<=\\})|(?=;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
1970 "patterns": [
1971 {
1972 "include": "#comment"
1973 },
1974 {
1975 "include": "#string"
1976 },
1977 {
1978 "name": "entity.name.type.module.js",
1979 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
1980 },
1981 {
1982 "include": "#punctuation-accessor"
1983 },
1984 {
1985 "include": "#decl-block"
1986 }
1987 ]
1988 },
1989 "type-alias-declaration": {
1990 "name": "meta.type.declaration.js",
1991 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*",
1992 "beginCaptures": {
1993 "1": {
1994 "name": "keyword.control.export.js"
1995 },
1996 "2": {
1997 "name": "storage.modifier.js"
1998 },
1999 "3": {
2000 "name": "storage.type.type.js"
2001 },
2002 "4": {
2003 "name": "entity.name.type.alias.js"
2004 }
2005 },
2006 "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
2007 "patterns": [
2008 {
2009 "include": "#comment"
2010 },
2011 {
2012 "include": "#type-parameters"
2013 },
2014 {
2015 "begin": "(=)\\s*(intrinsic)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2016 "beginCaptures": {
2017 "1": {
2018 "name": "keyword.operator.assignment.js"
2019 },
2020 "2": {
2021 "name": "keyword.control.intrinsic.js"
2022 }
2023 },
2024 "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
2025 "patterns": [
2026 {
2027 "include": "#type"
2028 }
2029 ]
2030 },
2031 {
2032 "begin": "(=)\\s*",
2033 "beginCaptures": {
2034 "1": {
2035 "name": "keyword.operator.assignment.js"
2036 }
2037 },
2038 "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
2039 "patterns": [
2040 {
2041 "include": "#type"
2042 }
2043 ]
2044 }
2045 ]
2046 },
2047 "import-equals-declaration": {
2048 "patterns": [
2049 {
2050 "name": "meta.import-equals.external.js",
2051 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()",
2052 "beginCaptures": {
2053 "1": {
2054 "name": "keyword.control.export.js"
2055 },
2056 "2": {
2057 "name": "storage.modifier.js"
2058 },
2059 "3": {
2060 "name": "keyword.control.import.js"
2061 },
2062 "4": {
2063 "name": "keyword.control.type.js"
2064 },
2065 "5": {
2066 "name": "variable.other.readwrite.alias.js"
2067 },
2068 "6": {
2069 "name": "keyword.operator.assignment.js"
2070 },
2071 "7": {
2072 "name": "keyword.control.require.js"
2073 },
2074 "8": {
2075 "name": "meta.brace.round.js"
2076 }
2077 },
2078 "end": "\\)",
2079 "endCaptures": {
2080 "0": {
2081 "name": "meta.brace.round.js"
2082 }
2083 },
2084 "patterns": [
2085 {
2086 "include": "#comment"
2087 },
2088 {
2089 "include": "#string"
2090 }
2091 ]
2092 },
2093 {
2094 "name": "meta.import-equals.internal.js",
2095 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(?!require\\b)",
2096 "beginCaptures": {
2097 "1": {
2098 "name": "keyword.control.export.js"
2099 },
2100 "2": {
2101 "name": "storage.modifier.js"
2102 },
2103 "3": {
2104 "name": "keyword.control.import.js"
2105 },
2106 "4": {
2107 "name": "keyword.control.type.js"
2108 },
2109 "5": {
2110 "name": "variable.other.readwrite.alias.js"
2111 },
2112 "6": {
2113 "name": "keyword.operator.assignment.js"
2114 }
2115 },
2116 "end": "(?=;|$|^)",
2117 "patterns": [
2118 {
2119 "include": "#single-line-comment-consuming-line-ending"
2120 },
2121 {
2122 "include": "#comment"
2123 },
2124 {
2125 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))",
2126 "captures": {
2127 "1": {
2128 "name": "entity.name.type.module.js"
2129 },
2130 "2": {
2131 "name": "punctuation.accessor.js"
2132 },
2133 "3": {
2134 "name": "punctuation.accessor.optional.js"
2135 }
2136 }
2137 },
2138 {
2139 "name": "variable.other.readwrite.js",
2140 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
2141 }
2142 ]
2143 }
2144 ]
2145 },
2146 "import-declaration": {
2147 "name": "meta.import.js",
2148 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type)(?!\\s+from))?(?!\\s*[:\\(])(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2149 "beginCaptures": {
2150 "1": {
2151 "name": "keyword.control.export.js"
2152 },
2153 "2": {
2154 "name": "storage.modifier.js"
2155 },
2156 "3": {
2157 "name": "keyword.control.import.js"
2158 },
2159 "4": {
2160 "name": "keyword.control.type.js"
2161 }
2162 },
2163 "end": "(?<!^import|[^\\._$[:alnum:]]import)(?=;|$|^)",
2164 "patterns": [
2165 {
2166 "include": "#single-line-comment-consuming-line-ending"
2167 },
2168 {
2169 "include": "#comment"
2170 },
2171 {
2172 "include": "#string"
2173 },
2174 {
2175 "begin": "(?<=^import|[^\\._$[:alnum:]]import)(?!\\s*[\"'])",
2176 "end": "\\bfrom\\b",
2177 "endCaptures": {
2178 "0": {
2179 "name": "keyword.control.from.js"
2180 }
2181 },
2182 "patterns": [
2183 {
2184 "include": "#import-export-declaration"
2185 }
2186 ]
2187 },
2188 {
2189 "include": "#import-export-declaration"
2190 }
2191 ]
2192 },
2193 "export-declaration": {
2194 "patterns": [
2195 {
2196 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)\\s+(as)\\s+(namespace)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
2197 "captures": {
2198 "1": {
2199 "name": "keyword.control.export.js"
2200 },
2201 "2": {
2202 "name": "keyword.control.as.js"
2203 },
2204 "3": {
2205 "name": "storage.type.namespace.js"
2206 },
2207 "4": {
2208 "name": "entity.name.type.module.js"
2209 }
2210 }
2211 },
2212 {
2213 "name": "meta.export.default.js",
2214 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))",
2215 "beginCaptures": {
2216 "1": {
2217 "name": "keyword.control.export.js"
2218 },
2219 "2": {
2220 "name": "keyword.control.type.js"
2221 },
2222 "3": {
2223 "name": "keyword.operator.assignment.js"
2224 },
2225 "4": {
2226 "name": "keyword.control.default.js"
2227 }
2228 },
2229 "end": "(?=$|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
2230 "patterns": [
2231 {
2232 "include": "#interface-declaration"
2233 },
2234 {
2235 "include": "#expression"
2236 }
2237 ]
2238 },
2239 {
2240 "name": "meta.export.js",
2241 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?\\b(?!(\\$)|(\\s*:))((?=\\s*[\\{*])|((?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s|,))(?!\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b)))",
2242 "beginCaptures": {
2243 "1": {
2244 "name": "keyword.control.export.js"
2245 },
2246 "2": {
2247 "name": "keyword.control.type.js"
2248 }
2249 },
2250 "end": "(?=$|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
2251 "patterns": [
2252 {
2253 "include": "#import-export-declaration"
2254 }
2255 ]
2256 }
2257 ]
2258 },
2259 "import-export-declaration": {
2260 "patterns": [
2261 {
2262 "include": "#comment"
2263 },
2264 {
2265 "include": "#string"
2266 },
2267 {
2268 "include": "#import-export-block"
2269 },
2270 {
2271 "name": "keyword.control.from.js",
2272 "match": "\\bfrom\\b"
2273 },
2274 {
2275 "include": "#import-export-assert-clause"
2276 },
2277 {
2278 "include": "#import-export-clause"
2279 }
2280 ]
2281 },
2282 "import-export-assert-clause": {
2283 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(assert)\\s*(\\{)",
2284 "beginCaptures": {
2285 "1": {
2286 "name": "keyword.control.assert.js"
2287 },
2288 "2": {
2289 "name": "punctuation.definition.block.js"
2290 }
2291 },
2292 "end": "\\}",
2293 "endCaptures": {
2294 "0": {
2295 "name": "punctuation.definition.block.js"
2296 }
2297 },
2298 "patterns": [
2299 {
2300 "include": "#comment"
2301 },
2302 {
2303 "include": "#string"
2304 },
2305 {
2306 "name": "meta.object-literal.key.js",
2307 "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)"
2308 },
2309 {
2310 "name": "punctuation.separator.key-value.js",
2311 "match": ":"
2312 }
2313 ]
2314 },
2315 "import-export-block": {
2316 "name": "meta.block.js",
2317 "begin": "\\{",
2318 "beginCaptures": {
2319 "0": {
2320 "name": "punctuation.definition.block.js"
2321 }
2322 },
2323 "end": "\\}",
2324 "endCaptures": {
2325 "0": {
2326 "name": "punctuation.definition.block.js"
2327 }
2328 },
2329 "patterns": [
2330 {
2331 "include": "#import-export-clause"
2332 }
2333 ]
2334 },
2335 "import-export-clause": {
2336 "patterns": [
2337 {
2338 "include": "#comment"
2339 },
2340 {
2341 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(?:(\\btype)\\s+)?(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*)))\\s+(as)\\s+(?:(default(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|([_$[:alpha:]][_$[:alnum:]]*))",
2342 "captures": {
2343 "1": {
2344 "name": "keyword.control.type.js"
2345 },
2346 "2": {
2347 "name": "keyword.control.default.js"
2348 },
2349 "3": {
2350 "name": "constant.language.import-export-all.js"
2351 },
2352 "4": {
2353 "name": "variable.other.readwrite.js"
2354 },
2355 "5": {
2356 "name": "keyword.control.as.js"
2357 },
2358 "6": {
2359 "name": "keyword.control.default.js"
2360 },
2361 "7": {
2362 "name": "variable.other.readwrite.alias.js"
2363 }
2364 }
2365 },
2366 {
2367 "include": "#punctuation-comma"
2368 },
2369 {
2370 "name": "constant.language.import-export-all.js",
2371 "match": "\\*"
2372 },
2373 {
2374 "name": "keyword.control.default.js",
2375 "match": "\\b(default)\\b"
2376 },
2377 {
2378 "match": "(?:(\\btype)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)",
2379 "captures": {
2380 "1": {
2381 "name": "keyword.control.type.js"
2382 },
2383 "2": {
2384 "name": "variable.other.readwrite.alias.js"
2385 }
2386 }
2387 }
2388 ]
2389 },
2390 "switch-statement": {
2391 "name": "switch-statement.expr.js",
2392 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bswitch\\s*\\()",
2393 "end": "\\}",
2394 "endCaptures": {
2395 "0": {
2396 "name": "punctuation.definition.block.js"
2397 }
2398 },
2399 "patterns": [
2400 {
2401 "include": "#comment"
2402 },
2403 {
2404 "name": "switch-expression.expr.js",
2405 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(switch)\\s*(\\()",
2406 "beginCaptures": {
2407 "1": {
2408 "name": "keyword.control.switch.js"
2409 },
2410 "2": {
2411 "name": "meta.brace.round.js"
2412 }
2413 },
2414 "end": "\\)",
2415 "endCaptures": {
2416 "0": {
2417 "name": "meta.brace.round.js"
2418 }
2419 },
2420 "patterns": [
2421 {
2422 "include": "#expression"
2423 }
2424 ]
2425 },
2426 {
2427 "name": "switch-block.expr.js",
2428 "begin": "\\{",
2429 "beginCaptures": {
2430 "0": {
2431 "name": "punctuation.definition.block.js"
2432 }
2433 },
2434 "end": "(?=\\})",
2435 "patterns": [
2436 {
2437 "name": "case-clause.expr.js",
2438 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default(?=:))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2439 "beginCaptures": {
2440 "1": {
2441 "name": "keyword.control.switch.js"
2442 }
2443 },
2444 "end": "(?=:)",
2445 "patterns": [
2446 {
2447 "include": "#expression"
2448 }
2449 ]
2450 },
2451 {
2452 "begin": "(:)\\s*(\\{)",
2453 "beginCaptures": {
2454 "1": {
2455 "name": "case-clause.expr.js punctuation.definition.section.case-statement.js"
2456 },
2457 "2": {
2458 "name": "meta.block.js punctuation.definition.block.js"
2459 }
2460 },
2461 "end": "\\}",
2462 "endCaptures": {
2463 "0": {
2464 "name": "meta.block.js punctuation.definition.block.js"
2465 }
2466 },
2467 "contentName": "meta.block.js",
2468 "patterns": [
2469 {
2470 "include": "#statements"
2471 }
2472 ]
2473 },
2474 {
2475 "match": "(:)",
2476 "captures": {
2477 "0": {
2478 "name": "case-clause.expr.js punctuation.definition.section.case-statement.js"
2479 }
2480 }
2481 },
2482 {
2483 "include": "#statements"
2484 }
2485 ]
2486 }
2487 ]
2488 },
2489 "for-loop": {
2490 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))for(?=((\\s+|(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*))await)?\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)?(\\())",
2491 "beginCaptures": {
2492 "0": {
2493 "name": "keyword.control.loop.js"
2494 }
2495 },
2496 "end": "(?<=\\))",
2497 "patterns": [
2498 {
2499 "include": "#comment"
2500 },
2501 {
2502 "name": "keyword.control.loop.js",
2503 "match": "await"
2504 },
2505 {
2506 "begin": "\\(",
2507 "beginCaptures": {
2508 "0": {
2509 "name": "meta.brace.round.js"
2510 }
2511 },
2512 "end": "\\)",
2513 "endCaptures": {
2514 "0": {
2515 "name": "meta.brace.round.js"
2516 }
2517 },
2518 "patterns": [
2519 {
2520 "include": "#var-expr"
2521 },
2522 {
2523 "include": "#expression"
2524 },
2525 {
2526 "include": "#punctuation-semicolon"
2527 }
2528 ]
2529 }
2530 ]
2531 },
2532 "if-statement": {
2533 "patterns": [
2534 {
2535 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bif\\s*(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))\\s*(?!\\{))",
2536 "end": "(?=;|$|\\})",
2537 "patterns": [
2538 {
2539 "include": "#comment"
2540 },
2541 {
2542 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(if)\\s*(\\()",
2543 "beginCaptures": {
2544 "1": {
2545 "name": "keyword.control.conditional.js"
2546 },
2547 "2": {
2548 "name": "meta.brace.round.js"
2549 }
2550 },
2551 "end": "\\)",
2552 "endCaptures": {
2553 "0": {
2554 "name": "meta.brace.round.js"
2555 }
2556 },
2557 "patterns": [
2558 {
2559 "include": "#expression"
2560 }
2561 ]
2562 },
2563 {
2564 "name": "string.regexp.js",
2565 "begin": "(?<=\\))\\s*\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
2566 "beginCaptures": {
2567 "0": {
2568 "name": "punctuation.definition.string.begin.js"
2569 }
2570 },
2571 "end": "(/)([dgimsuy]*)",
2572 "endCaptures": {
2573 "1": {
2574 "name": "punctuation.definition.string.end.js"
2575 },
2576 "2": {
2577 "name": "keyword.other.js"
2578 }
2579 },
2580 "patterns": [
2581 {
2582 "include": "#regexp"
2583 }
2584 ]
2585 },
2586 {
2587 "include": "#statements"
2588 }
2589 ]
2590 }
2591 ]
2592 },
2593 "decl-block": {
2594 "name": "meta.block.js",
2595 "begin": "\\{",
2596 "beginCaptures": {
2597 "0": {
2598 "name": "punctuation.definition.block.js"
2599 }
2600 },
2601 "end": "\\}",
2602 "endCaptures": {
2603 "0": {
2604 "name": "punctuation.definition.block.js"
2605 }
2606 },
2607 "patterns": [
2608 {
2609 "include": "#statements"
2610 }
2611 ]
2612 },
2613 "after-operator-block-as-object-literal": {
2614 "name": "meta.objectliteral.js",
2615 "begin": "(?<!\\+\\+|--)(?<=[:=(,\\[?+!>]|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^yield|[^\\._$[:alnum:]]yield|^throw|[^\\._$[:alnum:]]throw|^in|[^\\._$[:alnum:]]in|^of|[^\\._$[:alnum:]]of|^typeof|[^\\._$[:alnum:]]typeof|&&|\\|\\||\\*)\\s*(\\{)",
2616 "beginCaptures": {
2617 "1": {
2618 "name": "punctuation.definition.block.js"
2619 }
2620 },
2621 "end": "\\}",
2622 "endCaptures": {
2623 "0": {
2624 "name": "punctuation.definition.block.js"
2625 }
2626 },
2627 "patterns": [
2628 {
2629 "include": "#object-member"
2630 }
2631 ]
2632 },
2633 "object-literal": {
2634 "name": "meta.objectliteral.js",
2635 "begin": "\\{",
2636 "beginCaptures": {
2637 "0": {
2638 "name": "punctuation.definition.block.js"
2639 }
2640 },
2641 "end": "\\}",
2642 "endCaptures": {
2643 "0": {
2644 "name": "punctuation.definition.block.js"
2645 }
2646 },
2647 "patterns": [
2648 {
2649 "include": "#object-member"
2650 }
2651 ]
2652 },
2653 "object-member": {
2654 "patterns": [
2655 {
2656 "include": "#comment"
2657 },
2658 {
2659 "include": "#object-literal-method-declaration"
2660 },
2661 {
2662 "name": "meta.object.member.js meta.object-literal.key.js",
2663 "begin": "(?=\\[)",
2664 "end": "(?=:)|((?<=[\\]])(?=\\s*[\\(\\<]))",
2665 "patterns": [
2666 {
2667 "include": "#comment"
2668 },
2669 {
2670 "include": "#array-literal"
2671 }
2672 ]
2673 },
2674 {
2675 "name": "meta.object.member.js meta.object-literal.key.js",
2676 "begin": "(?=[\\'\\\"\\`])",
2677 "end": "(?=:)|((?<=[\\'\\\"\\`])(?=((\\s*[\\(\\<,}])|(\\s+(as|satisifies)\\s+))))",
2678 "patterns": [
2679 {
2680 "include": "#comment"
2681 },
2682 {
2683 "include": "#string"
2684 }
2685 ]
2686 },
2687 {
2688 "name": "meta.object.member.js meta.object-literal.key.js",
2689 "begin": "(?x)(?=(\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$)))",
2690 "end": "(?=:)|(?=\\s*([\\(\\<,}])|(\\s+as|satisifies\\s+))",
2691 "patterns": [
2692 {
2693 "include": "#comment"
2694 },
2695 {
2696 "include": "#numeric-literal"
2697 }
2698 ]
2699 },
2700 {
2701 "name": "meta.method.declaration.js",
2702 "begin": "(?<=[\\]\\'\\\"\\`])(?=\\s*[\\(\\<])",
2703 "end": "(?=\\}|;|,)|(?<=\\})",
2704 "patterns": [
2705 {
2706 "include": "#function-body"
2707 }
2708 ]
2709 },
2710 {
2711 "name": "meta.object.member.js",
2712 "match": "(?![_$[:alpha:]])([[:digit:]]+)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)",
2713 "captures": {
2714 "0": {
2715 "name": "meta.object-literal.key.js"
2716 },
2717 "1": {
2718 "name": "constant.numeric.decimal.js"
2719 }
2720 }
2721 },
2722 {
2723 "name": "meta.object.member.js",
2724 "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
2725 "captures": {
2726 "0": {
2727 "name": "meta.object-literal.key.js"
2728 },
2729 "1": {
2730 "name": "entity.name.function.js"
2731 }
2732 }
2733 },
2734 {
2735 "name": "meta.object.member.js",
2736 "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)",
2737 "captures": {
2738 "0": {
2739 "name": "meta.object-literal.key.js"
2740 }
2741 }
2742 },
2743 {
2744 "name": "meta.object.member.js",
2745 "begin": "\\.\\.\\.",
2746 "beginCaptures": {
2747 "0": {
2748 "name": "keyword.operator.spread.js"
2749 }
2750 },
2751 "end": "(?=,|\\})",
2752 "patterns": [
2753 {
2754 "include": "#expression"
2755 }
2756 ]
2757 },
2758 {
2759 "name": "meta.object.member.js",
2760 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$|\\/\\/|\\/\\*)",
2761 "captures": {
2762 "1": {
2763 "name": "variable.other.readwrite.js"
2764 }
2765 }
2766 },
2767 {
2768 "name": "meta.object.member.js",
2769 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*([,}]|$))",
2770 "captures": {
2771 "1": {
2772 "name": "keyword.control.as.js"
2773 },
2774 "2": {
2775 "name": "storage.modifier.js"
2776 }
2777 }
2778 },
2779 {
2780 "name": "meta.object.member.js",
2781 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(as)|(satisfies))\\s+",
2782 "beginCaptures": {
2783 "1": {
2784 "name": "keyword.control.as.js"
2785 },
2786 "2": {
2787 "name": "keyword.control.satisfies.js"
2788 }
2789 },
2790 "end": "(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|^|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as|satisifies)\\s+))",
2791 "patterns": [
2792 {
2793 "include": "#type"
2794 }
2795 ]
2796 },
2797 {
2798 "name": "meta.object.member.js",
2799 "begin": "(?=[_$[:alpha:]][_$[:alnum:]]*\\s*=)",
2800 "end": "(?=,|\\}|$|\\/\\/|\\/\\*)",
2801 "patterns": [
2802 {
2803 "include": "#expression"
2804 }
2805 ]
2806 },
2807 {
2808 "name": "meta.object.member.js",
2809 "begin": ":",
2810 "beginCaptures": {
2811 "0": {
2812 "name": "meta.object-literal.key.js punctuation.separator.key-value.js"
2813 }
2814 },
2815 "end": "(?=,|\\})",
2816 "patterns": [
2817 {
2818 "begin": "(?<=:)\\s*(async)?(?=\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2819 "beginCaptures": {
2820 "1": {
2821 "name": "storage.modifier.async.js"
2822 }
2823 },
2824 "end": "(?<=\\))",
2825 "patterns": [
2826 {
2827 "include": "#type-parameters"
2828 },
2829 {
2830 "begin": "\\(",
2831 "beginCaptures": {
2832 "0": {
2833 "name": "meta.brace.round.js"
2834 }
2835 },
2836 "end": "\\)",
2837 "endCaptures": {
2838 "0": {
2839 "name": "meta.brace.round.js"
2840 }
2841 },
2842 "patterns": [
2843 {
2844 "include": "#expression-inside-possibly-arrow-parens"
2845 }
2846 ]
2847 }
2848 ]
2849 },
2850 {
2851 "begin": "(?<=:)\\s*(async)?\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2852 "beginCaptures": {
2853 "1": {
2854 "name": "storage.modifier.async.js"
2855 },
2856 "2": {
2857 "name": "meta.brace.round.js"
2858 }
2859 },
2860 "end": "\\)",
2861 "endCaptures": {
2862 "0": {
2863 "name": "meta.brace.round.js"
2864 }
2865 },
2866 "patterns": [
2867 {
2868 "include": "#expression-inside-possibly-arrow-parens"
2869 }
2870 ]
2871 },
2872 {
2873 "begin": "(?<=:)\\s*(async)?\\s*(?=\\<\\s*$)",
2874 "beginCaptures": {
2875 "1": {
2876 "name": "storage.modifier.async.js"
2877 }
2878 },
2879 "end": "(?<=\\>)",
2880 "patterns": [
2881 {
2882 "include": "#type-parameters"
2883 }
2884 ]
2885 },
2886 {
2887 "begin": "(?<=\\>)\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2888 "beginCaptures": {
2889 "1": {
2890 "name": "meta.brace.round.js"
2891 }
2892 },
2893 "end": "\\)",
2894 "endCaptures": {
2895 "0": {
2896 "name": "meta.brace.round.js"
2897 }
2898 },
2899 "patterns": [
2900 {
2901 "include": "#expression-inside-possibly-arrow-parens"
2902 }
2903 ]
2904 },
2905 {
2906 "include": "#possibly-arrow-return-type"
2907 },
2908 {
2909 "include": "#expression"
2910 }
2911 ]
2912 },
2913 {
2914 "include": "#punctuation-comma"
2915 }
2916 ]
2917 },
2918 "ternary-expression": {
2919 "begin": "(?!\\?\\.\\s*[^[:digit:]])(\\?)(?!\\?)",
2920 "beginCaptures": {
2921 "1": {
2922 "name": "keyword.operator.ternary.js"
2923 }
2924 },
2925 "end": "\\s*(:)",
2926 "endCaptures": {
2927 "1": {
2928 "name": "keyword.operator.ternary.js"
2929 }
2930 },
2931 "patterns": [
2932 {
2933 "include": "#expression"
2934 }
2935 ]
2936 },
2937 "function-call": {
2938 "patterns": [
2939 {
2940 "begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())",
2941 "end": "(?<=\\))(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())",
2942 "patterns": [
2943 {
2944 "name": "meta.function-call.js",
2945 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))",
2946 "end": "(?=\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())",
2947 "patterns": [
2948 {
2949 "include": "#function-call-target"
2950 }
2951 ]
2952 },
2953 {
2954 "include": "#comment"
2955 },
2956 {
2957 "include": "#function-call-optionals"
2958 },
2959 {
2960 "include": "#type-arguments"
2961 },
2962 {
2963 "include": "#paren-expression"
2964 }
2965 ]
2966 },
2967 {
2968 "begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))",
2969 "end": "(?<=\\>)(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))",
2970 "patterns": [
2971 {
2972 "name": "meta.function-call.js",
2973 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))",
2974 "end": "(?=(<\\s*[\\{\\[\\(]\\s*$))",
2975 "patterns": [
2976 {
2977 "include": "#function-call-target"
2978 }
2979 ]
2980 },
2981 {
2982 "include": "#comment"
2983 },
2984 {
2985 "include": "#function-call-optionals"
2986 },
2987 {
2988 "include": "#type-arguments"
2989 }
2990 ]
2991 }
2992 ]
2993 },
2994 "function-call-target": {
2995 "patterns": [
2996 {
2997 "include": "#support-function-call-identifiers"
2998 },
2999 {
3000 "name": "entity.name.function.js",
3001 "match": "(\\#?[_$[:alpha:]][_$[:alnum:]]*)"
3002 }
3003 ]
3004 },
3005 "function-call-optionals": {
3006 "patterns": [
3007 {
3008 "name": "meta.function-call.js punctuation.accessor.optional.js",
3009 "match": "\\?\\."
3010 },
3011 {
3012 "name": "meta.function-call.js keyword.operator.definiteassignment.js",
3013 "match": "\\!"
3014 }
3015 ]
3016 },
3017 "support-function-call-identifiers": {
3018 "patterns": [
3019 {
3020 "include": "#literal"
3021 },
3022 {
3023 "include": "#support-objects"
3024 },
3025 {
3026 "include": "#object-identifiers"
3027 },
3028 {
3029 "include": "#punctuation-accessor"
3030 },
3031 {
3032 "name": "keyword.operator.expression.import.js",
3033 "match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*[\\(]\\s*[\\\"\\'\\`]))"
3034 }
3035 ]
3036 },
3037 "new-expr": {
3038 "name": "new.expr.js",
3039 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3040 "beginCaptures": {
3041 "1": {
3042 "name": "keyword.operator.new.js"
3043 }
3044 },
3045 "end": "(?<=\\))|(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
3046 "patterns": [
3047 {
3048 "include": "#expression"
3049 }
3050 ]
3051 },
3052 "instanceof-expr": {
3053 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(instanceof)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3054 "beginCaptures": {
3055 "1": {
3056 "name": "keyword.operator.expression.instanceof.js"
3057 }
3058 },
3059 "end": "(?<=\\))|(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|(===|!==|==|!=)|(([\\&\\~\\^\\|]\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s+instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
3060 "patterns": [
3061 {
3062 "include": "#type"
3063 }
3064 ]
3065 },
3066 "paren-expression-possibly-arrow": {
3067 "patterns": [
3068 {
3069 "begin": "(?<=[(=,])\\s*(async)?(?=\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
3070 "beginCaptures": {
3071 "1": {
3072 "name": "storage.modifier.async.js"
3073 }
3074 },
3075 "end": "(?<=\\))",
3076 "patterns": [
3077 {
3078 "include": "#paren-expression-possibly-arrow-with-typeparameters"
3079 }
3080 ]
3081 },
3082 {
3083 "begin": "(?<=[(=,]|=>|^return|[^\\._$[:alnum:]]return)\\s*(async)?(?=\\s*((((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\()|(<)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)))\\s*$)",
3084 "beginCaptures": {
3085 "1": {
3086 "name": "storage.modifier.async.js"
3087 }
3088 },
3089 "end": "(?<=\\))",
3090 "patterns": [
3091 {
3092 "include": "#paren-expression-possibly-arrow-with-typeparameters"
3093 }
3094 ]
3095 },
3096 {
3097 "include": "#possibly-arrow-return-type"
3098 }
3099 ]
3100 },
3101 "paren-expression-possibly-arrow-with-typeparameters": {
3102 "patterns": [
3103 {
3104 "include": "#type-parameters"
3105 },
3106 {
3107 "begin": "\\(",
3108 "beginCaptures": {
3109 "0": {
3110 "name": "meta.brace.round.js"
3111 }
3112 },
3113 "end": "\\)",
3114 "endCaptures": {
3115 "0": {
3116 "name": "meta.brace.round.js"
3117 }
3118 },
3119 "patterns": [
3120 {
3121 "include": "#expression-inside-possibly-arrow-parens"
3122 }
3123 ]
3124 }
3125 ]
3126 },
3127 "expression-inside-possibly-arrow-parens": {
3128 "patterns": [
3129 {
3130 "include": "#expressionWithoutIdentifiers"
3131 },
3132 {
3133 "include": "#comment"
3134 },
3135 {
3136 "include": "#string"
3137 },
3138 {
3139 "include": "#decorator"
3140 },
3141 {
3142 "include": "#destructuring-parameter"
3143 },
3144 {
3145 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)",
3146 "captures": {
3147 "1": {
3148 "name": "storage.modifier.js"
3149 }
3150 }
3151 },
3152 {
3153 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
3154 "captures": {
3155 "1": {
3156 "name": "storage.modifier.js"
3157 },
3158 "2": {
3159 "name": "keyword.operator.rest.js"
3160 },
3161 "3": {
3162 "name": "entity.name.function.js variable.language.this.js"
3163 },
3164 "4": {
3165 "name": "entity.name.function.js"
3166 },
3167 "5": {
3168 "name": "keyword.operator.optional.js"
3169 }
3170 }
3171 },
3172 {
3173 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*[:,]|$)",
3174 "captures": {
3175 "1": {
3176 "name": "storage.modifier.js"
3177 },
3178 "2": {
3179 "name": "keyword.operator.rest.js"
3180 },
3181 "3": {
3182 "name": "variable.parameter.js variable.language.this.js"
3183 },
3184 "4": {
3185 "name": "variable.parameter.js"
3186 },
3187 "5": {
3188 "name": "keyword.operator.optional.js"
3189 }
3190 }
3191 },
3192 {
3193 "include": "#type-annotation"
3194 },
3195 {
3196 "include": "#variable-initializer"
3197 },
3198 {
3199 "name": "punctuation.separator.parameter.js",
3200 "match": ","
3201 },
3202 {
3203 "include": "#identifiers"
3204 },
3205 {
3206 "include": "#expressionPunctuations"
3207 }
3208 ]
3209 },
3210 "paren-expression": {
3211 "begin": "\\(",
3212 "beginCaptures": {
3213 "0": {
3214 "name": "meta.brace.round.js"
3215 }
3216 },
3217 "end": "\\)",
3218 "endCaptures": {
3219 "0": {
3220 "name": "meta.brace.round.js"
3221 }
3222 },
3223 "patterns": [
3224 {
3225 "include": "#expression"
3226 }
3227 ]
3228 },
3229 "cast": {
3230 "patterns": [
3231 {
3232 "include": "#jsx"
3233 }
3234 ]
3235 },
3236 "expression-operators": {
3237 "patterns": [
3238 {
3239 "name": "keyword.control.flow.js",
3240 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(await)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3241 },
3242 {
3243 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?=\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*\\*)",
3244 "beginCaptures": {
3245 "1": {
3246 "name": "keyword.control.flow.js"
3247 }
3248 },
3249 "end": "\\*",
3250 "endCaptures": {
3251 "0": {
3252 "name": "keyword.generator.asterisk.js"
3253 }
3254 },
3255 "patterns": [
3256 {
3257 "include": "#comment"
3258 }
3259 ]
3260 },
3261 {
3262 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s*(\\*))?",
3263 "captures": {
3264 "1": {
3265 "name": "keyword.control.flow.js"
3266 },
3267 "2": {
3268 "name": "keyword.generator.asterisk.js"
3269 }
3270 }
3271 },
3272 {
3273 "name": "keyword.operator.expression.delete.js",
3274 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))delete(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3275 },
3276 {
3277 "name": "keyword.operator.expression.in.js",
3278 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))in(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()"
3279 },
3280 {
3281 "name": "keyword.operator.expression.of.js",
3282 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))of(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()"
3283 },
3284 {
3285 "name": "keyword.operator.expression.instanceof.js",
3286 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3287 },
3288 {
3289 "name": "keyword.operator.new.js",
3290 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3291 },
3292 {
3293 "include": "#typeof-operator"
3294 },
3295 {
3296 "name": "keyword.operator.expression.void.js",
3297 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))void(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3298 },
3299 {
3300 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*($|[;,:})\\]]))",
3301 "captures": {
3302 "1": {
3303 "name": "keyword.control.as.js"
3304 },
3305 "2": {
3306 "name": "storage.modifier.js"
3307 }
3308 }
3309 },
3310 {
3311 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(as)|(satisfies))\\s+",
3312 "beginCaptures": {
3313 "1": {
3314 "name": "keyword.control.as.js"
3315 },
3316 "2": {
3317 "name": "keyword.control.satisfies.js"
3318 }
3319 },
3320 "end": "(?=^|[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as|satisifies)\\s+)|(\\s+\\<))",
3321 "patterns": [
3322 {
3323 "include": "#type"
3324 }
3325 ]
3326 },
3327 {
3328 "name": "keyword.operator.spread.js",
3329 "match": "\\.\\.\\."
3330 },
3331 {
3332 "name": "keyword.operator.assignment.compound.js",
3333 "match": "\\*=|(?<!\\()/=|%=|\\+=|\\-="
3334 },
3335 {
3336 "name": "keyword.operator.assignment.compound.bitwise.js",
3337 "match": "\\&=|\\^=|<<=|>>=|>>>=|\\|="
3338 },
3339 {
3340 "name": "keyword.operator.bitwise.shift.js",
3341 "match": "<<|>>>|>>"
3342 },
3343 {
3344 "name": "keyword.operator.comparison.js",
3345 "match": "===|!==|==|!="
3346 },
3347 {
3348 "name": "keyword.operator.relational.js",
3349 "match": "<=|>=|<>|<|>"
3350 },
3351 {
3352 "match": "(?<=[_$[:alnum:]])(\\!)\\s*(?:(/=)|(?:(/)(?![/*])))",
3353 "captures": {
3354 "1": {
3355 "name": "keyword.operator.logical.js"
3356 },
3357 "2": {
3358 "name": "keyword.operator.assignment.compound.js"
3359 },
3360 "3": {
3361 "name": "keyword.operator.arithmetic.js"
3362 }
3363 }
3364 },
3365 {
3366 "name": "keyword.operator.logical.js",
3367 "match": "\\!|&&|\\|\\||\\?\\?"
3368 },
3369 {
3370 "name": "keyword.operator.bitwise.js",
3371 "match": "\\&|~|\\^|\\|"
3372 },
3373 {
3374 "name": "keyword.operator.assignment.js",
3375 "match": "\\="
3376 },
3377 {
3378 "name": "keyword.operator.decrement.js",
3379 "match": "--"
3380 },
3381 {
3382 "name": "keyword.operator.increment.js",
3383 "match": "\\+\\+"
3384 },
3385 {
3386 "name": "keyword.operator.arithmetic.js",
3387 "match": "%|\\*|/|-|\\+"
3388 },
3389 {
3390 "begin": "(?<=[_$[:alnum:])\\]])\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)+(?:(/=)|(?:(/)(?![/*]))))",
3391 "end": "(?:(/=)|(?:(/)(?!\\*([^\\*]|(\\*[^\\/]))*\\*\\/)))",
3392 "endCaptures": {
3393 "1": {
3394 "name": "keyword.operator.assignment.compound.js"
3395 },
3396 "2": {
3397 "name": "keyword.operator.arithmetic.js"
3398 }
3399 },
3400 "patterns": [
3401 {
3402 "include": "#comment"
3403 }
3404 ]
3405 },
3406 {
3407 "match": "(?<=[_$[:alnum:])\\]])\\s*(?:(/=)|(?:(/)(?![/*])))",
3408 "captures": {
3409 "1": {
3410 "name": "keyword.operator.assignment.compound.js"
3411 },
3412 "2": {
3413 "name": "keyword.operator.arithmetic.js"
3414 }
3415 }
3416 }
3417 ]
3418 },
3419 "typeof-operator": {
3420 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))typeof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3421 "beginCaptures": {
3422 "0": {
3423 "name": "keyword.operator.expression.typeof.js"
3424 }
3425 },
3426 "end": "(?=[,);}\\]=>:&|{\\?]|$|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
3427 "patterns": [
3428 {
3429 "include": "#expression"
3430 }
3431 ]
3432 },
3433 "literal": {
3434 "patterns": [
3435 {
3436 "include": "#numeric-literal"
3437 },
3438 {
3439 "include": "#boolean-literal"
3440 },
3441 {
3442 "include": "#null-literal"
3443 },
3444 {
3445 "include": "#undefined-literal"
3446 },
3447 {
3448 "include": "#numericConstant-literal"
3449 },
3450 {
3451 "include": "#array-literal"
3452 },
3453 {
3454 "include": "#this-literal"
3455 },
3456 {
3457 "include": "#super-literal"
3458 }
3459 ]
3460 },
3461 "array-literal": {
3462 "name": "meta.array.literal.js",
3463 "begin": "\\s*(\\[)",
3464 "beginCaptures": {
3465 "1": {
3466 "name": "meta.brace.square.js"
3467 }
3468 },
3469 "end": "\\]",
3470 "endCaptures": {
3471 "0": {
3472 "name": "meta.brace.square.js"
3473 }
3474 },
3475 "patterns": [
3476 {
3477 "include": "#expression"
3478 },
3479 {
3480 "include": "#punctuation-comma"
3481 }
3482 ]
3483 },
3484 "numeric-literal": {
3485 "patterns": [
3486 {
3487 "name": "constant.numeric.hex.js",
3488 "match": "\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$)",
3489 "captures": {
3490 "1": {
3491 "name": "storage.type.numeric.bigint.js"
3492 }
3493 }
3494 },
3495 {
3496 "name": "constant.numeric.binary.js",
3497 "match": "\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$)",
3498 "captures": {
3499 "1": {
3500 "name": "storage.type.numeric.bigint.js"
3501 }
3502 }
3503 },
3504 {
3505 "name": "constant.numeric.octal.js",
3506 "match": "\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$)",
3507 "captures": {
3508 "1": {
3509 "name": "storage.type.numeric.bigint.js"
3510 }
3511 }
3512 },
3513 {
3514 "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$)",
3515 "captures": {
3516 "0": {
3517 "name": "constant.numeric.decimal.js"
3518 },
3519 "1": {
3520 "name": "meta.delimiter.decimal.period.js"
3521 },
3522 "2": {
3523 "name": "storage.type.numeric.bigint.js"
3524 },
3525 "3": {
3526 "name": "meta.delimiter.decimal.period.js"
3527 },
3528 "4": {
3529 "name": "storage.type.numeric.bigint.js"
3530 },
3531 "5": {
3532 "name": "meta.delimiter.decimal.period.js"
3533 },
3534 "6": {
3535 "name": "storage.type.numeric.bigint.js"
3536 },
3537 "7": {
3538 "name": "storage.type.numeric.bigint.js"
3539 },
3540 "8": {
3541 "name": "meta.delimiter.decimal.period.js"
3542 },
3543 "9": {
3544 "name": "storage.type.numeric.bigint.js"
3545 },
3546 "10": {
3547 "name": "meta.delimiter.decimal.period.js"
3548 },
3549 "11": {
3550 "name": "storage.type.numeric.bigint.js"
3551 },
3552 "12": {
3553 "name": "meta.delimiter.decimal.period.js"
3554 },
3555 "13": {
3556 "name": "storage.type.numeric.bigint.js"
3557 },
3558 "14": {
3559 "name": "storage.type.numeric.bigint.js"
3560 }
3561 }
3562 }
3563 ]
3564 },
3565 "boolean-literal": {
3566 "patterns": [
3567 {
3568 "name": "constant.language.boolean.true.js",
3569 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))true(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3570 },
3571 {
3572 "name": "constant.language.boolean.false.js",
3573 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))false(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3574 }
3575 ]
3576 },
3577 "null-literal": {
3578 "name": "constant.language.null.js",
3579 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))null(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3580 },
3581 "this-literal": {
3582 "name": "variable.language.this.js",
3583 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))this\\b(?!\\$)"
3584 },
3585 "super-literal": {
3586 "name": "variable.language.super.js",
3587 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))super\\b(?!\\$)"
3588 },
3589 "undefined-literal": {
3590 "name": "constant.language.undefined.js",
3591 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))undefined(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3592 },
3593 "numericConstant-literal": {
3594 "patterns": [
3595 {
3596 "name": "constant.language.nan.js",
3597 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))NaN(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3598 },
3599 {
3600 "name": "constant.language.infinity.js",
3601 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Infinity(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3602 }
3603 ]
3604 },
3605 "support-objects": {
3606 "patterns": [
3607 {
3608 "name": "variable.language.arguments.js",
3609 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(arguments)\\b(?!\\$)"
3610 },
3611 {
3612 "name": "support.class.promise.js",
3613 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Promise)\\b(?!\\$)"
3614 },
3615 {
3616 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(import)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(meta)\\b(?!\\$)",
3617 "captures": {
3618 "1": {
3619 "name": "keyword.control.import.js"
3620 },
3621 "2": {
3622 "name": "punctuation.accessor.js"
3623 },
3624 "3": {
3625 "name": "punctuation.accessor.optional.js"
3626 },
3627 "4": {
3628 "name": "support.variable.property.importmeta.js"
3629 }
3630 }
3631 },
3632 {
3633 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(target)\\b(?!\\$)",
3634 "captures": {
3635 "1": {
3636 "name": "keyword.operator.new.js"
3637 },
3638 "2": {
3639 "name": "punctuation.accessor.js"
3640 },
3641 "3": {
3642 "name": "punctuation.accessor.optional.js"
3643 },
3644 "4": {
3645 "name": "support.variable.property.target.js"
3646 }
3647 }
3648 },
3649 {
3650 "match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s* (?:\n (?:(constructor|length|prototype|__proto__)\\b(?!\\$|\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\\())\n |\n (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\b(?!\\$)))",
3651 "captures": {
3652 "1": {
3653 "name": "punctuation.accessor.js"
3654 },
3655 "2": {
3656 "name": "punctuation.accessor.optional.js"
3657 },
3658 "3": {
3659 "name": "support.variable.property.js"
3660 },
3661 "4": {
3662 "name": "support.constant.js"
3663 }
3664 }
3665 },
3666 {
3667 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(exports)|(module)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)",
3668 "captures": {
3669 "1": {
3670 "name": "support.type.object.module.js"
3671 },
3672 "2": {
3673 "name": "support.type.object.module.js"
3674 },
3675 "3": {
3676 "name": "punctuation.accessor.js"
3677 },
3678 "4": {
3679 "name": "punctuation.accessor.optional.js"
3680 },
3681 "5": {
3682 "name": "support.type.object.module.js"
3683 }
3684 }
3685 }
3686 ]
3687 },
3688 "identifiers": {
3689 "patterns": [
3690 {
3691 "include": "#object-identifiers"
3692 },
3693 {
3694 "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))",
3695 "captures": {
3696 "1": {
3697 "name": "punctuation.accessor.js"
3698 },
3699 "2": {
3700 "name": "punctuation.accessor.optional.js"
3701 },
3702 "3": {
3703 "name": "entity.name.function.js"
3704 }
3705 }
3706 },
3707 {
3708 "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
3709 "captures": {
3710 "1": {
3711 "name": "punctuation.accessor.js"
3712 },
3713 "2": {
3714 "name": "punctuation.accessor.optional.js"
3715 },
3716 "3": {
3717 "name": "variable.other.constant.property.js"
3718 }
3719 }
3720 },
3721 {
3722 "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*)",
3723 "captures": {
3724 "1": {
3725 "name": "punctuation.accessor.js"
3726 },
3727 "2": {
3728 "name": "punctuation.accessor.optional.js"
3729 },
3730 "3": {
3731 "name": "variable.other.property.js"
3732 }
3733 }
3734 },
3735 {
3736 "name": "variable.other.constant.js",
3737 "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
3738 },
3739 {
3740 "name": "variable.other.readwrite.js",
3741 "match": "[_$[:alpha:]][_$[:alnum:]]*"
3742 }
3743 ]
3744 },
3745 "object-identifiers": {
3746 "patterns": [
3747 {
3748 "name": "support.class.js",
3749 "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\??\\.\\s*prototype\\b(?!\\$))"
3750 },
3751 {
3752 "match": "(?x)(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(?:\n (\\#?[[:upper:]][_$[:digit:][:upper:]]*) |\n (\\#?[_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)",
3753 "captures": {
3754 "1": {
3755 "name": "punctuation.accessor.js"
3756 },
3757 "2": {
3758 "name": "punctuation.accessor.optional.js"
3759 },
3760 "3": {
3761 "name": "variable.other.constant.object.property.js"
3762 },
3763 "4": {
3764 "name": "variable.other.object.property.js"
3765 }
3766 }
3767 },
3768 {
3769 "match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)",
3770 "captures": {
3771 "1": {
3772 "name": "variable.other.constant.object.js"
3773 },
3774 "2": {
3775 "name": "variable.other.object.js"
3776 }
3777 }
3778 }
3779 ]
3780 },
3781 "type-annotation": {
3782 "patterns": [
3783 {
3784 "name": "meta.type.annotation.js",
3785 "begin": "(:)(?=\\s*\\S)",
3786 "beginCaptures": {
3787 "1": {
3788 "name": "keyword.operator.type.annotation.js"
3789 }
3790 },
3791 "end": "(?<![:|&])((?=$|^|[,);\\}\\]]|//)|(?==[^>])|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))",
3792 "patterns": [
3793 {
3794 "include": "#type"
3795 }
3796 ]
3797 },
3798 {
3799 "name": "meta.type.annotation.js",
3800 "begin": "(:)",
3801 "beginCaptures": {
3802 "1": {
3803 "name": "keyword.operator.type.annotation.js"
3804 }
3805 },
3806 "end": "(?<![:|&])((?=[,);\\}\\]]|//)|(?==[^>])|(?=^\\s*$)|((?<=\\S)(?=\\s*$))|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))",
3807 "patterns": [
3808 {
3809 "include": "#type"
3810 }
3811 ]
3812 }
3813 ]
3814 },
3815 "parameter-type-annotation": {
3816 "patterns": [
3817 {
3818 "name": "meta.type.annotation.js",
3819 "begin": "(:)",
3820 "beginCaptures": {
3821 "1": {
3822 "name": "keyword.operator.type.annotation.js"
3823 }
3824 },
3825 "end": "(?=[,)])|(?==[^>])",
3826 "patterns": [
3827 {
3828 "include": "#type"
3829 }
3830 ]
3831 }
3832 ]
3833 },
3834 "return-type": {
3835 "patterns": [
3836 {
3837 "name": "meta.return.type.js",
3838 "begin": "(?<=\\))\\s*(:)(?=\\s*\\S)",
3839 "beginCaptures": {
3840 "1": {
3841 "name": "keyword.operator.type.annotation.js"
3842 }
3843 },
3844 "end": "(?<![:|&])(?=$|^|[{};,]|//)",
3845 "patterns": [
3846 {
3847 "include": "#return-type-core"
3848 }
3849 ]
3850 },
3851 {
3852 "name": "meta.return.type.js",
3853 "begin": "(?<=\\))\\s*(:)",
3854 "beginCaptures": {
3855 "1": {
3856 "name": "keyword.operator.type.annotation.js"
3857 }
3858 },
3859 "end": "(?<![:|&])((?=[{};,]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
3860 "patterns": [
3861 {
3862 "include": "#return-type-core"
3863 }
3864 ]
3865 }
3866 ]
3867 },
3868 "return-type-core": {
3869 "patterns": [
3870 {
3871 "include": "#comment"
3872 },
3873 {
3874 "begin": "(?<=[:|&])(?=\\s*\\{)",
3875 "end": "(?<=\\})",
3876 "patterns": [
3877 {
3878 "include": "#type-object"
3879 }
3880 ]
3881 },
3882 {
3883 "include": "#type-predicate-operator"
3884 },
3885 {
3886 "include": "#type"
3887 }
3888 ]
3889 },
3890 "arrow-return-type": {
3891 "name": "meta.return.type.arrow.js",
3892 "begin": "(?<=\\))\\s*(:)",
3893 "beginCaptures": {
3894 "1": {
3895 "name": "keyword.operator.type.annotation.js"
3896 }
3897 },
3898 "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
3899 "patterns": [
3900 {
3901 "include": "#arrow-return-type-body"
3902 }
3903 ]
3904 },
3905 "possibly-arrow-return-type": {
3906 "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*=>)",
3907 "beginCaptures": {
3908 "1": {
3909 "name": "meta.arrow.js meta.return.type.arrow.js keyword.operator.type.annotation.js"
3910 }
3911 },
3912 "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
3913 "contentName": "meta.arrow.js meta.return.type.arrow.js",
3914 "patterns": [
3915 {
3916 "include": "#arrow-return-type-body"
3917 }
3918 ]
3919 },
3920 "arrow-return-type-body": {
3921 "patterns": [
3922 {
3923 "begin": "(?<=[:])(?=\\s*\\{)",
3924 "end": "(?<=\\})",
3925 "patterns": [
3926 {
3927 "include": "#type-object"
3928 }
3929 ]
3930 },
3931 {
3932 "include": "#type-predicate-operator"
3933 },
3934 {
3935 "include": "#type"
3936 }
3937 ]
3938 },
3939 "type-parameters": {
3940 "name": "meta.type.parameters.js",
3941 "begin": "(<)",
3942 "beginCaptures": {
3943 "1": {
3944 "name": "punctuation.definition.typeparameters.begin.js"
3945 }
3946 },
3947 "end": "(>)",
3948 "endCaptures": {
3949 "1": {
3950 "name": "punctuation.definition.typeparameters.end.js"
3951 }
3952 },
3953 "patterns": [
3954 {
3955 "include": "#comment"
3956 },
3957 {
3958 "name": "storage.modifier.js",
3959 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3960 },
3961 {
3962 "include": "#type"
3963 },
3964 {
3965 "include": "#punctuation-comma"
3966 },
3967 {
3968 "name": "keyword.operator.assignment.js",
3969 "match": "(=)(?!>)"
3970 }
3971 ]
3972 },
3973 "type-arguments": {
3974 "name": "meta.type.parameters.js",
3975 "begin": "\\<",
3976 "beginCaptures": {
3977 "0": {
3978 "name": "punctuation.definition.typeparameters.begin.js"
3979 }
3980 },
3981 "end": "\\>",
3982 "endCaptures": {
3983 "0": {
3984 "name": "punctuation.definition.typeparameters.end.js"
3985 }
3986 },
3987 "patterns": [
3988 {
3989 "include": "#type-arguments-body"
3990 }
3991 ]
3992 },
3993 "type-arguments-body": {
3994 "patterns": [
3995 {
3996 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(_)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3997 "captures": {
3998 "0": {
3999 "name": "keyword.operator.type.js"
4000 }
4001 }
4002 },
4003 {
4004 "include": "#type"
4005 },
4006 {
4007 "include": "#punctuation-comma"
4008 }
4009 ]
4010 },
4011 "type": {
4012 "patterns": [
4013 {
4014 "include": "#comment"
4015 },
4016 {
4017 "include": "#type-string"
4018 },
4019 {
4020 "include": "#numeric-literal"
4021 },
4022 {
4023 "include": "#type-primitive"
4024 },
4025 {
4026 "include": "#type-builtin-literals"
4027 },
4028 {
4029 "include": "#type-parameters"
4030 },
4031 {
4032 "include": "#type-tuple"
4033 },
4034 {
4035 "include": "#type-object"
4036 },
4037 {
4038 "include": "#type-operators"
4039 },
4040 {
4041 "include": "#type-conditional"
4042 },
4043 {
4044 "include": "#type-fn-type-parameters"
4045 },
4046 {
4047 "include": "#type-paren-or-function-parameters"
4048 },
4049 {
4050 "include": "#type-function-return-type"
4051 },
4052 {
4053 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
4054 "captures": {
4055 "1": {
4056 "name": "storage.modifier.js"
4057 }
4058 }
4059 },
4060 {
4061 "include": "#type-name"
4062 }
4063 ]
4064 },
4065 "type-primitive": {
4066 "name": "support.type.primitive.js",
4067 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(string|number|bigint|boolean|symbol|any|void|never|unknown)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4068 },
4069 "type-builtin-literals": {
4070 "name": "support.type.builtin.js",
4071 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4072 },
4073 "type-tuple": {
4074 "name": "meta.type.tuple.js",
4075 "begin": "\\[",
4076 "beginCaptures": {
4077 "0": {
4078 "name": "meta.brace.square.js"
4079 }
4080 },
4081 "end": "\\]",
4082 "endCaptures": {
4083 "0": {
4084 "name": "meta.brace.square.js"
4085 }
4086 },
4087 "patterns": [
4088 {
4089 "name": "keyword.operator.rest.js",
4090 "match": "\\.\\.\\."
4091 },
4092 {
4093 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?)?\\s*(:)",
4094 "captures": {
4095 "1": {
4096 "name": "entity.name.label.js"
4097 },
4098 "2": {
4099 "name": "keyword.operator.optional.js"
4100 },
4101 "3": {
4102 "name": "punctuation.separator.label.js"
4103 }
4104 }
4105 },
4106 {
4107 "include": "#type"
4108 },
4109 {
4110 "include": "#punctuation-comma"
4111 }
4112 ]
4113 },
4114 "type-object": {
4115 "name": "meta.object.type.js",
4116 "begin": "\\{",
4117 "beginCaptures": {
4118 "0": {
4119 "name": "punctuation.definition.block.js"
4120 }
4121 },
4122 "end": "\\}",
4123 "endCaptures": {
4124 "0": {
4125 "name": "punctuation.definition.block.js"
4126 }
4127 },
4128 "patterns": [
4129 {
4130 "include": "#comment"
4131 },
4132 {
4133 "include": "#method-declaration"
4134 },
4135 {
4136 "include": "#indexer-declaration"
4137 },
4138 {
4139 "include": "#indexer-mapped-type-declaration"
4140 },
4141 {
4142 "include": "#field-declaration"
4143 },
4144 {
4145 "include": "#type-annotation"
4146 },
4147 {
4148 "begin": "\\.\\.\\.",
4149 "beginCaptures": {
4150 "0": {
4151 "name": "keyword.operator.spread.js"
4152 }
4153 },
4154 "end": "(?=\\}|;|,|$)|(?<=\\})",
4155 "patterns": [
4156 {
4157 "include": "#type"
4158 }
4159 ]
4160 },
4161 {
4162 "include": "#punctuation-comma"
4163 },
4164 {
4165 "include": "#punctuation-semicolon"
4166 },
4167 {
4168 "include": "#type"
4169 }
4170 ]
4171 },
4172 "type-conditional": {
4173 "patterns": [
4174 {
4175 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends)\\s+",
4176 "beginCaptures": {
4177 "1": {
4178 "name": "storage.modifier.js"
4179 }
4180 },
4181 "end": "(?<=:)",
4182 "patterns": [
4183 {
4184 "begin": "\\?",
4185 "beginCaptures": {
4186 "0": {
4187 "name": "keyword.operator.ternary.js"
4188 }
4189 },
4190 "end": ":",
4191 "endCaptures": {
4192 "0": {
4193 "name": "keyword.operator.ternary.js"
4194 }
4195 },
4196 "patterns": [
4197 {
4198 "include": "#type"
4199 }
4200 ]
4201 },
4202 {
4203 "include": "#type"
4204 }
4205 ]
4206 }
4207 ]
4208 },
4209 "type-paren-or-function-parameters": {
4210 "name": "meta.type.paren.cover.js",
4211 "begin": "\\(",
4212 "beginCaptures": {
4213 "0": {
4214 "name": "meta.brace.round.js"
4215 }
4216 },
4217 "end": "\\)",
4218 "endCaptures": {
4219 "0": {
4220 "name": "meta.brace.round.js"
4221 }
4222 },
4223 "patterns": [
4224 {
4225 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=\\s*(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))))",
4226 "captures": {
4227 "1": {
4228 "name": "storage.modifier.js"
4229 },
4230 "2": {
4231 "name": "keyword.operator.rest.js"
4232 },
4233 "3": {
4234 "name": "entity.name.function.js variable.language.this.js"
4235 },
4236 "4": {
4237 "name": "entity.name.function.js"
4238 },
4239 "5": {
4240 "name": "keyword.operator.optional.js"
4241 }
4242 }
4243 },
4244 {
4245 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=:)",
4246 "captures": {
4247 "1": {
4248 "name": "storage.modifier.js"
4249 },
4250 "2": {
4251 "name": "keyword.operator.rest.js"
4252 },
4253 "3": {
4254 "name": "variable.parameter.js variable.language.this.js"
4255 },
4256 "4": {
4257 "name": "variable.parameter.js"
4258 },
4259 "5": {
4260 "name": "keyword.operator.optional.js"
4261 }
4262 }
4263 },
4264 {
4265 "include": "#type-annotation"
4266 },
4267 {
4268 "name": "punctuation.separator.parameter.js",
4269 "match": ","
4270 },
4271 {
4272 "include": "#type"
4273 }
4274 ]
4275 },
4276 "type-fn-type-parameters": {
4277 "patterns": [
4278 {
4279 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b(?=\\s*\\<)",
4280 "beginCaptures": {
4281 "1": {
4282 "name": "meta.type.constructor.js storage.modifier.js"
4283 },
4284 "2": {
4285 "name": "meta.type.constructor.js keyword.control.new.js"
4286 }
4287 },
4288 "end": "(?<=>)",
4289 "patterns": [
4290 {
4291 "include": "#comment"
4292 },
4293 {
4294 "include": "#type-parameters"
4295 }
4296 ]
4297 },
4298 {
4299 "name": "meta.type.constructor.js",
4300 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b\\s*(?=\\()",
4301 "beginCaptures": {
4302 "1": {
4303 "name": "storage.modifier.js"
4304 },
4305 "2": {
4306 "name": "keyword.control.new.js"
4307 }
4308 },
4309 "end": "(?<=\\))",
4310 "patterns": [
4311 {
4312 "include": "#function-parameters"
4313 }
4314 ]
4315 },
4316 {
4317 "name": "meta.type.function.js",
4318 "begin": "(?x)(\n (?=\n [(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )\n )\n)",
4319 "end": "(?<=\\))",
4320 "patterns": [
4321 {
4322 "include": "#function-parameters"
4323 }
4324 ]
4325 }
4326 ]
4327 },
4328 "type-function-return-type": {
4329 "patterns": [
4330 {
4331 "name": "meta.type.function.return.js",
4332 "begin": "(=>)(?=\\s*\\S)",
4333 "beginCaptures": {
4334 "1": {
4335 "name": "storage.type.function.arrow.js"
4336 }
4337 },
4338 "end": "(?<!=>)(?<![|&])(?=[,\\]\\)\\{\\}=;>:\\?]|//|$)",
4339 "patterns": [
4340 {
4341 "include": "#type-function-return-type-core"
4342 }
4343 ]
4344 },
4345 {
4346 "name": "meta.type.function.return.js",
4347 "begin": "=>",
4348 "beginCaptures": {
4349 "0": {
4350 "name": "storage.type.function.arrow.js"
4351 }
4352 },
4353 "end": "(?<!=>)(?<![|&])((?=[,\\]\\)\\{\\}=;:\\?>]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
4354 "patterns": [
4355 {
4356 "include": "#type-function-return-type-core"
4357 }
4358 ]
4359 }
4360 ]
4361 },
4362 "type-function-return-type-core": {
4363 "patterns": [
4364 {
4365 "include": "#comment"
4366 },
4367 {
4368 "begin": "(?<==>)(?=\\s*\\{)",
4369 "end": "(?<=\\})",
4370 "patterns": [
4371 {
4372 "include": "#type-object"
4373 }
4374 ]
4375 },
4376 {
4377 "include": "#type-predicate-operator"
4378 },
4379 {
4380 "include": "#type"
4381 }
4382 ]
4383 },
4384 "type-operators": {
4385 "patterns": [
4386 {
4387 "include": "#typeof-operator"
4388 },
4389 {
4390 "include": "#type-infer"
4391 },
4392 {
4393 "begin": "([&|])(?=\\s*\\{)",
4394 "beginCaptures": {
4395 "0": {
4396 "name": "keyword.operator.type.js"
4397 }
4398 },
4399 "end": "(?<=\\})",
4400 "patterns": [
4401 {
4402 "include": "#type-object"
4403 }
4404 ]
4405 },
4406 {
4407 "begin": "[&|]",
4408 "beginCaptures": {
4409 "0": {
4410 "name": "keyword.operator.type.js"
4411 }
4412 },
4413 "end": "(?=\\S)"
4414 },
4415 {
4416 "name": "keyword.operator.expression.keyof.js",
4417 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))keyof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4418 },
4419 {
4420 "name": "keyword.operator.ternary.js",
4421 "match": "(\\?|\\:)"
4422 },
4423 {
4424 "name": "keyword.operator.expression.import.js",
4425 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*\\()"
4426 }
4427 ]
4428 },
4429 "type-infer": {
4430 "patterns": [
4431 {
4432 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(infer)\\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s+(extends)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))?",
4433 "name": "meta.type.infer.js",
4434 "captures": {
4435 "1": {
4436 "name": "keyword.operator.expression.infer.js"
4437 },
4438 "2": {
4439 "name": "entity.name.type.js"
4440 },
4441 "3": {
4442 "name": "keyword.operator.expression.extends.js"
4443 }
4444 }
4445 }
4446 ]
4447 },
4448 "type-predicate-operator": {
4449 "patterns": [
4450 {
4451 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(asserts)\\s+)?(?!asserts)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s(is)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4452 "captures": {
4453 "1": {
4454 "name": "keyword.operator.type.asserts.js"
4455 },
4456 "2": {
4457 "name": "variable.parameter.js variable.language.this.js"
4458 },
4459 "3": {
4460 "name": "variable.parameter.js"
4461 },
4462 "4": {
4463 "name": "keyword.operator.expression.is.js"
4464 }
4465 }
4466 },
4467 {
4468 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(asserts)\\s+(?!is)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4469 "captures": {
4470 "1": {
4471 "name": "keyword.operator.type.asserts.js"
4472 },
4473 "2": {
4474 "name": "variable.parameter.js variable.language.this.js"
4475 },
4476 "3": {
4477 "name": "variable.parameter.js"
4478 }
4479 }
4480 },
4481 {
4482 "name": "keyword.operator.type.asserts.js",
4483 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))asserts(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4484 },
4485 {
4486 "name": "keyword.operator.expression.is.js",
4487 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))is(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4488 }
4489 ]
4490 },
4491 "type-name": {
4492 "patterns": [
4493 {
4494 "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(<)",
4495 "captures": {
4496 "1": {
4497 "name": "entity.name.type.module.js"
4498 },
4499 "2": {
4500 "name": "punctuation.accessor.js"
4501 },
4502 "3": {
4503 "name": "punctuation.accessor.optional.js"
4504 },
4505 "4": {
4506 "name": "meta.type.parameters.js punctuation.definition.typeparameters.begin.js"
4507 }
4508 },
4509 "end": "(>)",
4510 "endCaptures": {
4511 "1": {
4512 "name": "meta.type.parameters.js punctuation.definition.typeparameters.end.js"
4513 }
4514 },
4515 "contentName": "meta.type.parameters.js",
4516 "patterns": [
4517 {
4518 "include": "#type-arguments-body"
4519 }
4520 ]
4521 },
4522 {
4523 "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(<)",
4524 "beginCaptures": {
4525 "1": {
4526 "name": "entity.name.type.js"
4527 },
4528 "2": {
4529 "name": "meta.type.parameters.js punctuation.definition.typeparameters.begin.js"
4530 }
4531 },
4532 "end": "(>)",
4533 "endCaptures": {
4534 "1": {
4535 "name": "meta.type.parameters.js punctuation.definition.typeparameters.end.js"
4536 }
4537 },
4538 "contentName": "meta.type.parameters.js",
4539 "patterns": [
4540 {
4541 "include": "#type-arguments-body"
4542 }
4543 ]
4544 },
4545 {
4546 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))",
4547 "captures": {
4548 "1": {
4549 "name": "entity.name.type.module.js"
4550 },
4551 "2": {
4552 "name": "punctuation.accessor.js"
4553 },
4554 "3": {
4555 "name": "punctuation.accessor.optional.js"
4556 }
4557 }
4558 },
4559 {
4560 "name": "entity.name.type.js",
4561 "match": "[_$[:alpha:]][_$[:alnum:]]*"
4562 }
4563 ]
4564 },
4565 "punctuation-comma": {
4566 "name": "punctuation.separator.comma.js",
4567 "match": ","
4568 },
4569 "punctuation-semicolon": {
4570 "name": "punctuation.terminator.statement.js",
4571 "match": ";"
4572 },
4573 "punctuation-accessor": {
4574 "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))",
4575 "captures": {
4576 "1": {
4577 "name": "punctuation.accessor.js"
4578 },
4579 "2": {
4580 "name": "punctuation.accessor.optional.js"
4581 }
4582 }
4583 },
4584 "string": {
4585 "patterns": [
4586 {
4587 "include": "#qstring-single"
4588 },
4589 {
4590 "include": "#qstring-double"
4591 },
4592 {
4593 "include": "#template"
4594 }
4595 ]
4596 },
4597 "qstring-double": {
4598 "name": "string.quoted.double.js",
4599 "begin": "\"",
4600 "beginCaptures": {
4601 "0": {
4602 "name": "punctuation.definition.string.begin.js"
4603 }
4604 },
4605 "end": "(\")|((?:[^\\\\\\n])$)",
4606 "endCaptures": {
4607 "1": {
4608 "name": "punctuation.definition.string.end.js"
4609 },
4610 "2": {
4611 "name": "invalid.illegal.newline.js"
4612 }
4613 },
4614 "patterns": [
4615 {
4616 "include": "#string-character-escape"
4617 }
4618 ]
4619 },
4620 "qstring-single": {
4621 "name": "string.quoted.single.js",
4622 "begin": "'",
4623 "beginCaptures": {
4624 "0": {
4625 "name": "punctuation.definition.string.begin.js"
4626 }
4627 },
4628 "end": "(\\')|((?:[^\\\\\\n])$)",
4629 "endCaptures": {
4630 "1": {
4631 "name": "punctuation.definition.string.end.js"
4632 },
4633 "2": {
4634 "name": "invalid.illegal.newline.js"
4635 }
4636 },
4637 "patterns": [
4638 {
4639 "include": "#string-character-escape"
4640 }
4641 ]
4642 },
4643 "string-character-escape": {
4644 "name": "constant.character.escape.js",
4645 "match": "\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u\\{[0-9A-Fa-f]+\\}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)"
4646 },
4647 "template": {
4648 "patterns": [
4649 {
4650 "include": "#template-call"
4651 },
4652 {
4653 "name": "string.template.js",
4654 "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
4655 "beginCaptures": {
4656 "1": {
4657 "name": "entity.name.function.tagged-template.js"
4658 },
4659 "2": {
4660 "name": "punctuation.definition.string.template.begin.js"
4661 }
4662 },
4663 "end": "`",
4664 "endCaptures": {
4665 "0": {
4666 "name": "punctuation.definition.string.template.end.js"
4667 }
4668 },
4669 "patterns": [
4670 {
4671 "include": "#template-substitution-element"
4672 },
4673 {
4674 "include": "#string-character-escape"
4675 }
4676 ]
4677 }
4678 ]
4679 },
4680 "template-call": {
4681 "patterns": [
4682 {
4683 "name": "string.template.js",
4684 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?`)",
4685 "end": "(?=`)",
4686 "patterns": [
4687 {
4688 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))",
4689 "end": "(?=(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?`)",
4690 "patterns": [
4691 {
4692 "include": "#support-function-call-identifiers"
4693 },
4694 {
4695 "name": "entity.name.function.tagged-template.js",
4696 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
4697 }
4698 ]
4699 },
4700 {
4701 "include": "#type-arguments"
4702 }
4703 ]
4704 },
4705 {
4706 "name": "string.template.js",
4707 "begin": "([_$[:alpha:]][_$[:alnum:]]*)?\\s*(?=(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)`)",
4708 "beginCaptures": {
4709 "1": {
4710 "name": "entity.name.function.tagged-template.js"
4711 }
4712 },
4713 "end": "(?=`)",
4714 "patterns": [
4715 {
4716 "include": "#type-arguments"
4717 }
4718 ]
4719 }
4720 ]
4721 },
4722 "template-substitution-element": {
4723 "name": "meta.template.expression.js",
4724 "begin": "\\$\\{",
4725 "beginCaptures": {
4726 "0": {
4727 "name": "punctuation.definition.template-expression.begin.js"
4728 }
4729 },
4730 "end": "\\}",
4731 "endCaptures": {
4732 "0": {
4733 "name": "punctuation.definition.template-expression.end.js"
4734 }
4735 },
4736 "patterns": [
4737 {
4738 "include": "#expression"
4739 }
4740 ],
4741 "contentName": "meta.embedded.line.js"
4742 },
4743 "type-string": {
4744 "patterns": [
4745 {
4746 "include": "#qstring-single"
4747 },
4748 {
4749 "include": "#qstring-double"
4750 },
4751 {
4752 "include": "#template-type"
4753 }
4754 ]
4755 },
4756 "template-type": {
4757 "patterns": [
4758 {
4759 "include": "#template-call"
4760 },
4761 {
4762 "name": "string.template.js",
4763 "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
4764 "beginCaptures": {
4765 "1": {
4766 "name": "entity.name.function.tagged-template.js"
4767 },
4768 "2": {
4769 "name": "punctuation.definition.string.template.begin.js"
4770 }
4771 },
4772 "end": "`",
4773 "endCaptures": {
4774 "0": {
4775 "name": "punctuation.definition.string.template.end.js"
4776 }
4777 },
4778 "patterns": [
4779 {
4780 "include": "#template-type-substitution-element"
4781 },
4782 {
4783 "include": "#string-character-escape"
4784 }
4785 ]
4786 }
4787 ]
4788 },
4789 "template-type-substitution-element": {
4790 "name": "meta.template.expression.js",
4791 "begin": "\\$\\{",
4792 "beginCaptures": {
4793 "0": {
4794 "name": "punctuation.definition.template-expression.begin.js"
4795 }
4796 },
4797 "end": "\\}",
4798 "endCaptures": {
4799 "0": {
4800 "name": "punctuation.definition.template-expression.end.js"
4801 }
4802 },
4803 "patterns": [
4804 {
4805 "include": "#type"
4806 }
4807 ],
4808 "contentName": "meta.embedded.line.js"
4809 },
4810 "regex": {
4811 "patterns": [
4812 {
4813 "name": "string.regexp.js",
4814 "begin": "(?<!\\+\\+|--|})(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
4815 "beginCaptures": {
4816 "1": {
4817 "name": "punctuation.definition.string.begin.js"
4818 }
4819 },
4820 "end": "(/)([dgimsuy]*)",
4821 "endCaptures": {
4822 "1": {
4823 "name": "punctuation.definition.string.end.js"
4824 },
4825 "2": {
4826 "name": "keyword.other.js"
4827 }
4828 },
4829 "patterns": [
4830 {
4831 "include": "#regexp"
4832 }
4833 ]
4834 },
4835 {
4836 "name": "string.regexp.js",
4837 "begin": "((?<![_$[:alnum:])\\]]|\\+\\+|--|}|\\*\\/)|((?<=^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case))\\s*)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
4838 "beginCaptures": {
4839 "0": {
4840 "name": "punctuation.definition.string.begin.js"
4841 }
4842 },
4843 "end": "(/)([dgimsuy]*)",
4844 "endCaptures": {
4845 "1": {
4846 "name": "punctuation.definition.string.end.js"
4847 },
4848 "2": {
4849 "name": "keyword.other.js"
4850 }
4851 },
4852 "patterns": [
4853 {
4854 "include": "#regexp"
4855 }
4856 ]
4857 }
4858 ]
4859 },
4860 "regexp": {
4861 "patterns": [
4862 {
4863 "name": "keyword.control.anchor.regexp",
4864 "match": "\\\\[bB]|\\^|\\$"
4865 },
4866 {
4867 "match": "\\\\[1-9]\\d*|\\\\k<([a-zA-Z_$][\\w$]*)>",
4868 "captures": {
4869 "0": {
4870 "name": "keyword.other.back-reference.regexp"
4871 },
4872 "1": {
4873 "name": "variable.other.regexp"
4874 }
4875 }
4876 },
4877 {
4878 "name": "keyword.operator.quantifier.regexp",
4879 "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??"
4880 },
4881 {
4882 "name": "keyword.operator.or.regexp",
4883 "match": "\\|"
4884 },
4885 {
4886 "name": "meta.group.assertion.regexp",
4887 "begin": "(\\()((\\?=)|(\\?!)|(\\?<=)|(\\?<!))",
4888 "beginCaptures": {
4889 "1": {
4890 "name": "punctuation.definition.group.regexp"
4891 },
4892 "2": {
4893 "name": "punctuation.definition.group.assertion.regexp"
4894 },
4895 "3": {
4896 "name": "meta.assertion.look-ahead.regexp"
4897 },
4898 "4": {
4899 "name": "meta.assertion.negative-look-ahead.regexp"
4900 },
4901 "5": {
4902 "name": "meta.assertion.look-behind.regexp"
4903 },
4904 "6": {
4905 "name": "meta.assertion.negative-look-behind.regexp"
4906 }
4907 },
4908 "end": "(\\))",
4909 "endCaptures": {
4910 "1": {
4911 "name": "punctuation.definition.group.regexp"
4912 }
4913 },
4914 "patterns": [
4915 {
4916 "include": "#regexp"
4917 }
4918 ]
4919 },
4920 {
4921 "name": "meta.group.regexp",
4922 "begin": "\\((?:(\\?:)|(?:\\?<([a-zA-Z_$][\\w$]*)>))?",
4923 "beginCaptures": {
4924 "0": {
4925 "name": "punctuation.definition.group.regexp"
4926 },
4927 "1": {
4928 "name": "punctuation.definition.group.no-capture.regexp"
4929 },
4930 "2": {
4931 "name": "variable.other.regexp"
4932 }
4933 },
4934 "end": "\\)",
4935 "endCaptures": {
4936 "0": {
4937 "name": "punctuation.definition.group.regexp"
4938 }
4939 },
4940 "patterns": [
4941 {
4942 "include": "#regexp"
4943 }
4944 ]
4945 },
4946 {
4947 "name": "constant.other.character-class.set.regexp",
4948 "begin": "(\\[)(\\^)?",
4949 "beginCaptures": {
4950 "1": {
4951 "name": "punctuation.definition.character-class.regexp"
4952 },
4953 "2": {
4954 "name": "keyword.operator.negation.regexp"
4955 }
4956 },
4957 "end": "(\\])",
4958 "endCaptures": {
4959 "1": {
4960 "name": "punctuation.definition.character-class.regexp"
4961 }
4962 },
4963 "patterns": [
4964 {
4965 "name": "constant.other.character-class.range.regexp",
4966 "match": "(?:.|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))",
4967 "captures": {
4968 "1": {
4969 "name": "constant.character.numeric.regexp"
4970 },
4971 "2": {
4972 "name": "constant.character.control.regexp"
4973 },
4974 "3": {
4975 "name": "constant.character.escape.backslash.regexp"
4976 },
4977 "4": {
4978 "name": "constant.character.numeric.regexp"
4979 },
4980 "5": {
4981 "name": "constant.character.control.regexp"
4982 },
4983 "6": {
4984 "name": "constant.character.escape.backslash.regexp"
4985 }
4986 }
4987 },
4988 {
4989 "include": "#regex-character-class"
4990 }
4991 ]
4992 },
4993 {
4994 "include": "#regex-character-class"
4995 }
4996 ]
4997 },
4998 "regex-character-class": {
4999 "patterns": [
5000 {
5001 "name": "constant.other.character-class.regexp",
5002 "match": "\\\\[wWsSdDtrnvf]|\\."
5003 },
5004 {
5005 "name": "constant.character.numeric.regexp",
5006 "match": "\\\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})"
5007 },
5008 {
5009 "name": "constant.character.control.regexp",
5010 "match": "\\\\c[A-Z]"
5011 },
5012 {
5013 "name": "constant.character.escape.backslash.regexp",
5014 "match": "\\\\."
5015 }
5016 ]
5017 },
5018 "comment": {
5019 "patterns": [
5020 {
5021 "name": "comment.block.documentation.js",
5022 "begin": "/\\*\\*(?!/)",
5023 "beginCaptures": {
5024 "0": {
5025 "name": "punctuation.definition.comment.js"
5026 }
5027 },
5028 "end": "\\*/",
5029 "endCaptures": {
5030 "0": {
5031 "name": "punctuation.definition.comment.js"
5032 }
5033 },
5034 "patterns": [
5035 {
5036 "include": "#docblock"
5037 }
5038 ]
5039 },
5040 {
5041 "name": "comment.block.js",
5042 "begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?",
5043 "beginCaptures": {
5044 "1": {
5045 "name": "punctuation.definition.comment.js"
5046 },
5047 "2": {
5048 "name": "storage.type.internaldeclaration.js"
5049 },
5050 "3": {
5051 "name": "punctuation.decorator.internaldeclaration.js"
5052 }
5053 },
5054 "end": "\\*/",
5055 "endCaptures": {
5056 "0": {
5057 "name": "punctuation.definition.comment.js"
5058 }
5059 }
5060 },
5061 {
5062 "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)",
5063 "beginCaptures": {
5064 "1": {
5065 "name": "punctuation.whitespace.comment.leading.js"
5066 },
5067 "2": {
5068 "name": "comment.line.double-slash.js"
5069 },
5070 "3": {
5071 "name": "punctuation.definition.comment.js"
5072 },
5073 "4": {
5074 "name": "storage.type.internaldeclaration.js"
5075 },
5076 "5": {
5077 "name": "punctuation.decorator.internaldeclaration.js"
5078 }
5079 },
5080 "end": "(?=$)",
5081 "contentName": "comment.line.double-slash.js"
5082 }
5083 ]
5084 },
5085 "single-line-comment-consuming-line-ending": {
5086 "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)",
5087 "beginCaptures": {
5088 "1": {
5089 "name": "punctuation.whitespace.comment.leading.js"
5090 },
5091 "2": {
5092 "name": "comment.line.double-slash.js"
5093 },
5094 "3": {
5095 "name": "punctuation.definition.comment.js"
5096 },
5097 "4": {
5098 "name": "storage.type.internaldeclaration.js"
5099 },
5100 "5": {
5101 "name": "punctuation.decorator.internaldeclaration.js"
5102 }
5103 },
5104 "end": "(?=^)",
5105 "contentName": "comment.line.double-slash.js"
5106 },
5107 "directives": {
5108 "name": "comment.line.triple-slash.directive.js",
5109 "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name|resolution-mode)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)",
5110 "beginCaptures": {
5111 "1": {
5112 "name": "punctuation.definition.comment.js"
5113 }
5114 },
5115 "end": "(?=$)",
5116 "patterns": [
5117 {
5118 "name": "meta.tag.js",
5119 "begin": "(<)(reference|amd-dependency|amd-module)",
5120 "beginCaptures": {
5121 "1": {
5122 "name": "punctuation.definition.tag.directive.js"
5123 },
5124 "2": {
5125 "name": "entity.name.tag.directive.js"
5126 }
5127 },
5128 "end": "/>",
5129 "endCaptures": {
5130 "0": {
5131 "name": "punctuation.definition.tag.directive.js"
5132 }
5133 },
5134 "patterns": [
5135 {
5136 "name": "entity.other.attribute-name.directive.js",
5137 "match": "path|types|no-default-lib|lib|name|resolution-mode"
5138 },
5139 {
5140 "name": "keyword.operator.assignment.js",
5141 "match": "="
5142 },
5143 {
5144 "include": "#string"
5145 }
5146 ]
5147 }
5148 ]
5149 },
5150 "docblock": {
5151 "patterns": [
5152 {
5153 "match": "(?x)\n((@)(?:access|api))\n\\s+\n(private|protected|public)\n\\b",
5154 "captures": {
5155 "1": {
5156 "name": "storage.type.class.jsdoc"
5157 },
5158 "2": {
5159 "name": "punctuation.definition.block.tag.jsdoc"
5160 },
5161 "3": {
5162 "name": "constant.language.access-type.jsdoc"
5163 }
5164 }
5165 },
5166 {
5167 "match": "(?x)\n((@)author)\n\\s+\n(\n [^@\\s<>*/]\n (?:[^@<>*/]|\\*[^/])*\n)\n(?:\n \\s*\n (<)\n ([^>\\s]+)\n (>)\n)?",
5168 "captures": {
5169 "1": {
5170 "name": "storage.type.class.jsdoc"
5171 },
5172 "2": {
5173 "name": "punctuation.definition.block.tag.jsdoc"
5174 },
5175 "3": {
5176 "name": "entity.name.type.instance.jsdoc"
5177 },
5178 "4": {
5179 "name": "punctuation.definition.bracket.angle.begin.jsdoc"
5180 },
5181 "5": {
5182 "name": "constant.other.email.link.underline.jsdoc"
5183 },
5184 "6": {
5185 "name": "punctuation.definition.bracket.angle.end.jsdoc"
5186 }
5187 }
5188 },
5189 {
5190 "match": "(?x)\n((@)borrows) \\s+\n((?:[^@\\s*/]|\\*[^/])+) # <that namepath>\n\\s+ (as) \\s+ # as\n((?:[^@\\s*/]|\\*[^/])+) # <this namepath>",
5191 "captures": {
5192 "1": {
5193 "name": "storage.type.class.jsdoc"
5194 },
5195 "2": {
5196 "name": "punctuation.definition.block.tag.jsdoc"
5197 },
5198 "3": {
5199 "name": "entity.name.type.instance.jsdoc"
5200 },
5201 "4": {
5202 "name": "keyword.operator.control.jsdoc"
5203 },
5204 "5": {
5205 "name": "entity.name.type.instance.jsdoc"
5206 }
5207 }
5208 },
5209 {
5210 "name": "meta.example.jsdoc",
5211 "begin": "((@)example)\\s+",
5212 "end": "(?=@|\\*/)",
5213 "beginCaptures": {
5214 "1": {
5215 "name": "storage.type.class.jsdoc"
5216 },
5217 "2": {
5218 "name": "punctuation.definition.block.tag.jsdoc"
5219 }
5220 },
5221 "patterns": [
5222 {
5223 "match": "^\\s\\*\\s+"
5224 },
5225 {
5226 "contentName": "constant.other.description.jsdoc",
5227 "begin": "\\G(<)caption(>)",
5228 "beginCaptures": {
5229 "0": {
5230 "name": "entity.name.tag.inline.jsdoc"
5231 },
5232 "1": {
5233 "name": "punctuation.definition.bracket.angle.begin.jsdoc"
5234 },
5235 "2": {
5236 "name": "punctuation.definition.bracket.angle.end.jsdoc"
5237 }
5238 },
5239 "end": "(</)caption(>)|(?=\\*/)",
5240 "endCaptures": {
5241 "0": {
5242 "name": "entity.name.tag.inline.jsdoc"
5243 },
5244 "1": {
5245 "name": "punctuation.definition.bracket.angle.begin.jsdoc"
5246 },
5247 "2": {
5248 "name": "punctuation.definition.bracket.angle.end.jsdoc"
5249 }
5250 }
5251 },
5252 {
5253 "match": "[^\\s@*](?:[^*]|\\*[^/])*",
5254 "captures": {
5255 "0": {
5256 "name": "source.embedded.js"
5257 }
5258 }
5259 }
5260 ]
5261 },
5262 {
5263 "match": "(?x) ((@)kind) \\s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \\b",
5264 "captures": {
5265 "1": {
5266 "name": "storage.type.class.jsdoc"
5267 },
5268 "2": {
5269 "name": "punctuation.definition.block.tag.jsdoc"
5270 },
5271 "3": {
5272 "name": "constant.language.symbol-type.jsdoc"
5273 }
5274 }
5275 },
5276 {
5277 "match": "(?x)\n((@)see)\n\\s+\n(?:\n # URL\n (\n (?=https?://)\n (?:[^\\s*]|\\*[^/])+\n )\n |\n # JSDoc namepath\n (\n (?!\n # Avoid matching bare URIs (also acceptable as links)\n https?://\n |\n # Avoid matching {@inline tags}; we match those below\n (?:\\[[^\\[\\]]*\\])? # Possible description [preceding]{@tag}\n {@(?:link|linkcode|linkplain|tutorial)\\b\n )\n # Matched namepath\n (?:[^@\\s*/]|\\*[^/])+\n )\n)",
5278 "captures": {
5279 "1": {
5280 "name": "storage.type.class.jsdoc"
5281 },
5282 "2": {
5283 "name": "punctuation.definition.block.tag.jsdoc"
5284 },
5285 "3": {
5286 "name": "variable.other.link.underline.jsdoc"
5287 },
5288 "4": {
5289 "name": "entity.name.type.instance.jsdoc"
5290 }
5291 }
5292 },
5293 {
5294 "match": "(?x)\n((@)template)\n\\s+\n# One or more valid identifiers\n(\n [A-Za-z_$] # First character: non-numeric word character\n [\\w$.\\[\\]]* # Rest of identifier\n (?: # Possible list of additional identifiers\n \\s* , \\s*\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n )*\n)",
5295 "captures": {
5296 "1": {
5297 "name": "storage.type.class.jsdoc"
5298 },
5299 "2": {
5300 "name": "punctuation.definition.block.tag.jsdoc"
5301 },
5302 "3": {
5303 "name": "variable.other.jsdoc"
5304 }
5305 }
5306 },
5307 {
5308 "begin": "(?x)((@)template)\\s+(?={)",
5309 "beginCaptures": {
5310 "1": {
5311 "name": "storage.type.class.jsdoc"
5312 },
5313 "2": {
5314 "name": "punctuation.definition.block.tag.jsdoc"
5315 }
5316 },
5317 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5318 "patterns": [
5319 {
5320 "include": "#jsdoctype"
5321 },
5322 {
5323 "name": "variable.other.jsdoc",
5324 "match": "([A-Za-z_$][\\w$.\\[\\]]*)"
5325 }
5326 ]
5327 },
5328 {
5329 "match": "(?x)\n(\n (@)\n (?:arg|argument|const|constant|member|namespace|param|var)\n)\n\\s+\n(\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n)",
5330 "captures": {
5331 "1": {
5332 "name": "storage.type.class.jsdoc"
5333 },
5334 "2": {
5335 "name": "punctuation.definition.block.tag.jsdoc"
5336 },
5337 "3": {
5338 "name": "variable.other.jsdoc"
5339 }
5340 }
5341 },
5342 {
5343 "begin": "((@)typedef)\\s+(?={)",
5344 "beginCaptures": {
5345 "1": {
5346 "name": "storage.type.class.jsdoc"
5347 },
5348 "2": {
5349 "name": "punctuation.definition.block.tag.jsdoc"
5350 }
5351 },
5352 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5353 "patterns": [
5354 {
5355 "include": "#jsdoctype"
5356 },
5357 {
5358 "name": "entity.name.type.instance.jsdoc",
5359 "match": "(?:[^@\\s*/]|\\*[^/])+"
5360 }
5361 ]
5362 },
5363 {
5364 "begin": "((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?={)",
5365 "beginCaptures": {
5366 "1": {
5367 "name": "storage.type.class.jsdoc"
5368 },
5369 "2": {
5370 "name": "punctuation.definition.block.tag.jsdoc"
5371 }
5372 },
5373 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5374 "patterns": [
5375 {
5376 "include": "#jsdoctype"
5377 },
5378 {
5379 "name": "variable.other.jsdoc",
5380 "match": "([A-Za-z_$][\\w$.\\[\\]]*)"
5381 },
5382 {
5383 "name": "variable.other.jsdoc",
5384 "match": "(?x)\n(\\[)\\s*\n[\\w$]+\n(?:\n (?:\\[\\])? # Foo[ ].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [\\w$]+\n)*\n(?:\n \\s*\n (=) # [foo=bar] Default parameter value\n \\s*\n (\n # The inner regexes are to stop the match early at */ and to not stop at escaped quotes\n (?>\n \"(?:(?:\\*(?!/))|(?:\\\\(?!\"))|[^*\\\\])*?\" | # [foo=\"bar\"] Double-quoted\n '(?:(?:\\*(?!/))|(?:\\\\(?!'))|[^*\\\\])*?' | # [foo='bar'] Single-quoted\n \\[ (?:(?:\\*(?!/))|[^*])*? \\] | # [foo=[1,2]] Array literal\n (?:(?:\\*(?!/))|\\s(?!\\s*\\])|\\[.*?(?:\\]|(?=\\*/))|[^*\\s\\[\\]])* # Everything else\n )*\n )\n)?\n\\s*(?:(\\])((?:[^*\\s]|\\*[^\\s/])+)?|(?=\\*/))",
5385 "captures": {
5386 "1": {
5387 "name": "punctuation.definition.optional-value.begin.bracket.square.jsdoc"
5388 },
5389 "2": {
5390 "name": "keyword.operator.assignment.jsdoc"
5391 },
5392 "3": {
5393 "name": "source.embedded.js"
5394 },
5395 "4": {
5396 "name": "punctuation.definition.optional-value.end.bracket.square.jsdoc"
5397 },
5398 "5": {
5399 "name": "invalid.illegal.syntax.jsdoc"
5400 }
5401 }
5402 }
5403 ]
5404 },
5405 {
5406 "begin": "(?x)\n(\n (@)\n (?:define|enum|exception|export|extends|lends|implements|modifies\n |namespace|private|protected|returns?|suppress|this|throws|type\n |yields?)\n)\n\\s+(?={)",
5407 "beginCaptures": {
5408 "1": {
5409 "name": "storage.type.class.jsdoc"
5410 },
5411 "2": {
5412 "name": "punctuation.definition.block.tag.jsdoc"
5413 }
5414 },
5415 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5416 "patterns": [
5417 {
5418 "include": "#jsdoctype"
5419 }
5420 ]
5421 },
5422 {
5423 "match": "(?x)\n(\n (@)\n (?:alias|augments|callback|constructs|emits|event|fires|exports?\n |extends|external|function|func|host|lends|listens|interface|memberof!?\n |method|module|mixes|mixin|name|requires|see|this|typedef|uses)\n)\n\\s+\n(\n (?:\n [^{}@\\s*] | \\*[^/]\n )+\n)",
5424 "captures": {
5425 "1": {
5426 "name": "storage.type.class.jsdoc"
5427 },
5428 "2": {
5429 "name": "punctuation.definition.block.tag.jsdoc"
5430 },
5431 "3": {
5432 "name": "entity.name.type.instance.jsdoc"
5433 }
5434 }
5435 },
5436 {
5437 "contentName": "variable.other.jsdoc",
5438 "begin": "((@)(?:default(?:value)?|license|version))\\s+(([''\"]))",
5439 "beginCaptures": {
5440 "1": {
5441 "name": "storage.type.class.jsdoc"
5442 },
5443 "2": {
5444 "name": "punctuation.definition.block.tag.jsdoc"
5445 },
5446 "3": {
5447 "name": "variable.other.jsdoc"
5448 },
5449 "4": {
5450 "name": "punctuation.definition.string.begin.jsdoc"
5451 }
5452 },
5453 "end": "(\\3)|(?=$|\\*/)",
5454 "endCaptures": {
5455 "0": {
5456 "name": "variable.other.jsdoc"
5457 },
5458 "1": {
5459 "name": "punctuation.definition.string.end.jsdoc"
5460 }
5461 }
5462 },
5463 {
5464 "match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^\\s*]+)",
5465 "captures": {
5466 "1": {
5467 "name": "storage.type.class.jsdoc"
5468 },
5469 "2": {
5470 "name": "punctuation.definition.block.tag.jsdoc"
5471 },
5472 "3": {
5473 "name": "variable.other.jsdoc"
5474 }
5475 }
5476 },
5477 {
5478 "name": "storage.type.class.jsdoc",
5479 "match": "(?x) (@) (?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc |inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method |mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects |override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected |public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary |suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce|yields?) \\b",
5480 "captures": {
5481 "1": {
5482 "name": "punctuation.definition.block.tag.jsdoc"
5483 }
5484 }
5485 },
5486 {
5487 "include": "#inline-tags"
5488 },
5489 {
5490 "match": "((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\\s+)",
5491 "captures": {
5492 "1": {
5493 "name": "storage.type.class.jsdoc"
5494 },
5495 "2": {
5496 "name": "punctuation.definition.block.tag.jsdoc"
5497 }
5498 }
5499 }
5500 ]
5501 },
5502 "brackets": {
5503 "patterns": [
5504 {
5505 "begin": "{",
5506 "end": "}|(?=\\*/)",
5507 "patterns": [
5508 {
5509 "include": "#brackets"
5510 }
5511 ]
5512 },
5513 {
5514 "begin": "\\[",
5515 "end": "\\]|(?=\\*/)",
5516 "patterns": [
5517 {
5518 "include": "#brackets"
5519 }
5520 ]
5521 }
5522 ]
5523 },
5524 "inline-tags": {
5525 "patterns": [
5526 {
5527 "name": "constant.other.description.jsdoc",
5528 "match": "(\\[)[^\\]]+(\\])(?={@(?:link|linkcode|linkplain|tutorial))",
5529 "captures": {
5530 "1": {
5531 "name": "punctuation.definition.bracket.square.begin.jsdoc"
5532 },
5533 "2": {
5534 "name": "punctuation.definition.bracket.square.end.jsdoc"
5535 }
5536 }
5537 },
5538 {
5539 "name": "entity.name.type.instance.jsdoc",
5540 "begin": "({)((@)(?:link(?:code|plain)?|tutorial))\\s*",
5541 "beginCaptures": {
5542 "1": {
5543 "name": "punctuation.definition.bracket.curly.begin.jsdoc"
5544 },
5545 "2": {
5546 "name": "storage.type.class.jsdoc"
5547 },
5548 "3": {
5549 "name": "punctuation.definition.inline.tag.jsdoc"
5550 }
5551 },
5552 "end": "}|(?=\\*/)",
5553 "endCaptures": {
5554 "0": {
5555 "name": "punctuation.definition.bracket.curly.end.jsdoc"
5556 }
5557 },
5558 "patterns": [
5559 {
5560 "match": "\\G((?=https?://)(?:[^|}\\s*]|\\*[/])+)(\\|)?",
5561 "captures": {
5562 "1": {
5563 "name": "variable.other.link.underline.jsdoc"
5564 },
5565 "2": {
5566 "name": "punctuation.separator.pipe.jsdoc"
5567 }
5568 }
5569 },
5570 {
5571 "match": "\\G((?:[^{}@\\s|*]|\\*[^/])+)(\\|)?",
5572 "captures": {
5573 "1": {
5574 "name": "variable.other.description.jsdoc"
5575 },
5576 "2": {
5577 "name": "punctuation.separator.pipe.jsdoc"
5578 }
5579 }
5580 }
5581 ]
5582 }
5583 ]
5584 },
5585 "jsdoctype": {
5586 "patterns": [
5587 {
5588 "contentName": "entity.name.type.instance.jsdoc",
5589 "begin": "\\G({)",
5590 "beginCaptures": {
5591 "0": {
5592 "name": "entity.name.type.instance.jsdoc"
5593 },
5594 "1": {
5595 "name": "punctuation.definition.bracket.curly.begin.jsdoc"
5596 }
5597 },
5598 "end": "((}))\\s*|(?=\\*/)",
5599 "endCaptures": {
5600 "1": {
5601 "name": "entity.name.type.instance.jsdoc"
5602 },
5603 "2": {
5604 "name": "punctuation.definition.bracket.curly.end.jsdoc"
5605 }
5606 },
5607 "patterns": [
5608 {
5609 "include": "#brackets"
5610 }
5611 ]
5612 }
5613 ]
5614 },
5615 "jsx": {
5616 "patterns": [
5617 {
5618 "include": "#jsx-tag-without-attributes-in-expression"
5619 },
5620 {
5621 "include": "#jsx-tag-in-expression"
5622 }
5623 ]
5624 },
5625 "jsx-tag-without-attributes-in-expression": {
5626 "begin": "(?<!\\+\\+|--)(?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\*\\/|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*(?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>))",
5627 "end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>))",
5628 "patterns": [
5629 {
5630 "include": "#jsx-tag-without-attributes"
5631 }
5632 ]
5633 },
5634 "jsx-tag-without-attributes": {
5635 "name": "meta.tag.without-attributes.js",
5636 "begin": "(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>)",
5637 "end": "(</)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>)",
5638 "beginCaptures": {
5639 "1": {
5640 "name": "punctuation.definition.tag.begin.js"
5641 },
5642 "2": {
5643 "name": "entity.name.tag.namespace.js"
5644 },
5645 "3": {
5646 "name": "punctuation.separator.namespace.js"
5647 },
5648 "4": {
5649 "name": "entity.name.tag.js"
5650 },
5651 "5": {
5652 "name": "support.class.component.js"
5653 },
5654 "6": {
5655 "name": "punctuation.definition.tag.end.js"
5656 }
5657 },
5658 "endCaptures": {
5659 "1": {
5660 "name": "punctuation.definition.tag.begin.js"
5661 },
5662 "2": {
5663 "name": "entity.name.tag.namespace.js"
5664 },
5665 "3": {
5666 "name": "punctuation.separator.namespace.js"
5667 },
5668 "4": {
5669 "name": "entity.name.tag.js"
5670 },
5671 "5": {
5672 "name": "support.class.component.js"
5673 },
5674 "6": {
5675 "name": "punctuation.definition.tag.end.js"
5676 }
5677 },
5678 "contentName": "meta.jsx.children.js",
5679 "patterns": [
5680 {
5681 "include": "#jsx-children"
5682 }
5683 ]
5684 },
5685 "jsx-tag-in-expression": {
5686 "begin": "(?x)\n (?<!\\+\\+|--)(?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\*\\/|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>))",
5687 "end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>))",
5688 "patterns": [
5689 {
5690 "include": "#jsx-tag"
5691 }
5692 ]
5693 },
5694 "jsx-tag": {
5695 "name": "meta.tag.js",
5696 "begin": "(?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>))",
5697 "end": "(/>)|(?:(</)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>))",
5698 "endCaptures": {
5699 "1": {
5700 "name": "punctuation.definition.tag.end.js"
5701 },
5702 "2": {
5703 "name": "punctuation.definition.tag.begin.js"
5704 },
5705 "3": {
5706 "name": "entity.name.tag.namespace.js"
5707 },
5708 "4": {
5709 "name": "punctuation.separator.namespace.js"
5710 },
5711 "5": {
5712 "name": "entity.name.tag.js"
5713 },
5714 "6": {
5715 "name": "support.class.component.js"
5716 },
5717 "7": {
5718 "name": "punctuation.definition.tag.end.js"
5719 }
5720 },
5721 "patterns": [
5722 {
5723 "begin": "(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>)",
5724 "beginCaptures": {
5725 "1": {
5726 "name": "punctuation.definition.tag.begin.js"
5727 },
5728 "2": {
5729 "name": "entity.name.tag.namespace.js"
5730 },
5731 "3": {
5732 "name": "punctuation.separator.namespace.js"
5733 },
5734 "4": {
5735 "name": "entity.name.tag.js"
5736 },
5737 "5": {
5738 "name": "support.class.component.js"
5739 }
5740 },
5741 "end": "(?=[/]?>)",
5742 "patterns": [
5743 {
5744 "include": "#comment"
5745 },
5746 {
5747 "include": "#type-arguments"
5748 },
5749 {
5750 "include": "#jsx-tag-attributes"
5751 }
5752 ]
5753 },
5754 {
5755 "begin": "(>)",
5756 "beginCaptures": {
5757 "1": {
5758 "name": "punctuation.definition.tag.end.js"
5759 }
5760 },
5761 "end": "(?=</)",
5762 "contentName": "meta.jsx.children.js",
5763 "patterns": [
5764 {
5765 "include": "#jsx-children"
5766 }
5767 ]
5768 }
5769 ]
5770 },
5771 "jsx-children": {
5772 "patterns": [
5773 {
5774 "include": "#jsx-tag-without-attributes"
5775 },
5776 {
5777 "include": "#jsx-tag"
5778 },
5779 {
5780 "include": "#jsx-evaluated-code"
5781 },
5782 {
5783 "include": "#jsx-entities"
5784 }
5785 ]
5786 },
5787 "jsx-evaluated-code": {
5788 "contentName": "meta.embedded.expression.js",
5789 "begin": "\\{",
5790 "end": "\\}",
5791 "beginCaptures": {
5792 "0": {
5793 "name": "punctuation.section.embedded.begin.js"
5794 }
5795 },
5796 "endCaptures": {
5797 "0": {
5798 "name": "punctuation.section.embedded.end.js"
5799 }
5800 },
5801 "patterns": [
5802 {
5803 "include": "#expression"
5804 }
5805 ]
5806 },
5807 "jsx-entities": {
5808 "patterns": [
5809 {
5810 "name": "constant.character.entity.js",
5811 "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
5812 "captures": {
5813 "1": {
5814 "name": "punctuation.definition.entity.js"
5815 },
5816 "3": {
5817 "name": "punctuation.definition.entity.js"
5818 }
5819 }
5820 }
5821 ]
5822 },
5823 "jsx-tag-attributes": {
5824 "name": "meta.tag.attributes.js",
5825 "begin": "\\s+",
5826 "end": "(?=[/]?>)",
5827 "patterns": [
5828 {
5829 "include": "#comment"
5830 },
5831 {
5832 "include": "#jsx-tag-attribute-name"
5833 },
5834 {
5835 "include": "#jsx-tag-attribute-assignment"
5836 },
5837 {
5838 "include": "#jsx-string-double-quoted"
5839 },
5840 {
5841 "include": "#jsx-string-single-quoted"
5842 },
5843 {
5844 "include": "#jsx-evaluated-code"
5845 },
5846 {
5847 "include": "#jsx-tag-attributes-illegal"
5848 }
5849 ]
5850 },
5851 "jsx-tag-attribute-name": {
5852 "match": "(?x)\n \\s*\n (?:([_$[:alpha:]][-_$[:alnum:].]*)(:))?\n ([_$[:alpha:]][-_$[:alnum:]]*)\n (?=\\s|=|/?>|/\\*|//)",
5853 "captures": {
5854 "1": {
5855 "name": "entity.other.attribute-name.namespace.js"
5856 },
5857 "2": {
5858 "name": "punctuation.separator.namespace.js"
5859 },
5860 "3": {
5861 "name": "entity.other.attribute-name.js"
5862 }
5863 }
5864 },
5865 "jsx-tag-attribute-assignment": {
5866 "name": "keyword.operator.assignment.js",
5867 "match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))"
5868 },
5869 "jsx-string-double-quoted": {
5870 "name": "string.quoted.double.js",
5871 "begin": "\"",
5872 "end": "\"",
5873 "beginCaptures": {
5874 "0": {
5875 "name": "punctuation.definition.string.begin.js"
5876 }
5877 },
5878 "endCaptures": {
5879 "0": {
5880 "name": "punctuation.definition.string.end.js"
5881 }
5882 },
5883 "patterns": [
5884 {
5885 "include": "#jsx-entities"
5886 }
5887 ]
5888 },
5889 "jsx-string-single-quoted": {
5890 "name": "string.quoted.single.js",
5891 "begin": "'",
5892 "end": "'",
5893 "beginCaptures": {
5894 "0": {
5895 "name": "punctuation.definition.string.begin.js"
5896 }
5897 },
5898 "endCaptures": {
5899 "0": {
5900 "name": "punctuation.definition.string.end.js"
5901 }
5902 },
5903 "patterns": [
5904 {
5905 "include": "#jsx-entities"
5906 }
5907 ]
5908 },
5909 "jsx-tag-attributes-illegal": {
5910 "name": "invalid.illegal.attribute.js",
5911 "match": "\\S+"
5912 }
5913 }
5914 }
5915