PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.27.6
Code Block Pro – Beautiful Syntax Highlighting v1.27.6
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.27.6, at build/shiki/languages/javascript.tmLanguage.json

5,990 lines 250.4 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/8c7482b94b548eab56da64dbfb30b82589b3f747",
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|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\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|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\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*(?=$|\\/\\/)",
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|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\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*(?=$|\\/\\/)",
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 "name": "meta.var.expr.js",
438 "begin": "(?=(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b((?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))",
439 "beginCaptures": {
440 "1": {
441 "name": "keyword.control.export.js"
442 },
443 "2": {
444 "name": "storage.modifier.js"
445 },
446 "3": {
447 "name": "storage.type.js"
448 }
449 },
450 "end": "(?!(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b((?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))|((?<!^using|[^\\._$[:alnum:]]using|^await\\s+using|[^\\._$[:alnum:]]await\\s+using)(?=\\s*$)))",
451 "patterns": [
452 {
453 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b((?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
454 "beginCaptures": {
455 "1": {
456 "name": "keyword.control.export.js"
457 },
458 "2": {
459 "name": "storage.modifier.js"
460 },
461 "3": {
462 "name": "storage.type.js"
463 }
464 },
465 "end": "(?=\\S)"
466 },
467 {
468 "include": "#var-single-const"
469 },
470 {
471 "include": "#variable-initializer"
472 },
473 {
474 "include": "#comment"
475 },
476 {
477 "begin": "(,)\\s*((?!\\S)|(?=\\/\\/))",
478 "beginCaptures": {
479 "1": {
480 "name": "punctuation.separator.comma.js"
481 }
482 },
483 "end": "(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))",
484 "patterns": [
485 {
486 "include": "#single-line-comment-consuming-line-ending"
487 },
488 {
489 "include": "#comment"
490 },
491 {
492 "include": "#var-single-const"
493 },
494 {
495 "include": "#punctuation-comma"
496 }
497 ]
498 },
499 {
500 "include": "#punctuation-comma"
501 }
502 ]
503 }
504 ]
505 },
506 "var-single-variable": {
507 "patterns": [
508 {
509 "name": "meta.var-single-variable.expr.js",
510 "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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
511 "beginCaptures": {
512 "1": {
513 "name": "meta.definition.variable.js entity.name.function.js"
514 },
515 "2": {
516 "name": "keyword.operator.definiteassignment.js"
517 }
518 },
519 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))",
520 "patterns": [
521 {
522 "include": "#var-single-variable-type-annotation"
523 }
524 ]
525 },
526 {
527 "name": "meta.var-single-variable.expr.js",
528 "begin": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])(\\!)?",
529 "beginCaptures": {
530 "1": {
531 "name": "meta.definition.variable.js variable.other.constant.js"
532 },
533 "2": {
534 "name": "keyword.operator.definiteassignment.js"
535 }
536 },
537 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))",
538 "patterns": [
539 {
540 "include": "#var-single-variable-type-annotation"
541 }
542 ]
543 },
544 {
545 "name": "meta.var-single-variable.expr.js",
546 "begin": "([_$[:alpha:]][_$[:alnum:]]*)(\\!)?",
547 "beginCaptures": {
548 "1": {
549 "name": "meta.definition.variable.js variable.other.readwrite.js"
550 },
551 "2": {
552 "name": "keyword.operator.definiteassignment.js"
553 }
554 },
555 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))",
556 "patterns": [
557 {
558 "include": "#var-single-variable-type-annotation"
559 }
560 ]
561 }
562 ]
563 },
564 "var-single-const": {
565 "patterns": [
566 {
567 "name": "meta.var-single-variable.expr.js",
568 "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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
569 "beginCaptures": {
570 "1": {
571 "name": "meta.definition.variable.js variable.other.constant.js entity.name.function.js"
572 }
573 },
574 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))",
575 "patterns": [
576 {
577 "include": "#var-single-variable-type-annotation"
578 }
579 ]
580 },
581 {
582 "name": "meta.var-single-variable.expr.js",
583 "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
584 "beginCaptures": {
585 "1": {
586 "name": "meta.definition.variable.js variable.other.constant.js"
587 }
588 },
589 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))",
590 "patterns": [
591 {
592 "include": "#var-single-variable-type-annotation"
593 }
594 ]
595 }
596 ]
597 },
598 "var-single-variable-type-annotation": {
599 "patterns": [
600 {
601 "include": "#type-annotation"
602 },
603 {
604 "include": "#string"
605 },
606 {
607 "include": "#comment"
608 }
609 ]
610 },
611 "destructuring-variable": {
612 "patterns": [
613 {
614 "name": "meta.object-binding-pattern-variable.js",
615 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)",
616 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
617 "patterns": [
618 {
619 "include": "#object-binding-pattern"
620 },
621 {
622 "include": "#type-annotation"
623 },
624 {
625 "include": "#comment"
626 }
627 ]
628 },
629 {
630 "name": "meta.array-binding-pattern-variable.js",
631 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)",
632 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
633 "patterns": [
634 {
635 "include": "#array-binding-pattern"
636 },
637 {
638 "include": "#type-annotation"
639 },
640 {
641 "include": "#comment"
642 }
643 ]
644 }
645 ]
646 },
647 "destructuring-const": {
648 "patterns": [
649 {
650 "name": "meta.object-binding-pattern-variable.js",
651 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)",
652 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
653 "patterns": [
654 {
655 "include": "#object-binding-pattern-const"
656 },
657 {
658 "include": "#type-annotation"
659 },
660 {
661 "include": "#comment"
662 }
663 ]
664 },
665 {
666 "name": "meta.array-binding-pattern-variable.js",
667 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)",
668 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
669 "patterns": [
670 {
671 "include": "#array-binding-pattern-const"
672 },
673 {
674 "include": "#type-annotation"
675 },
676 {
677 "include": "#comment"
678 }
679 ]
680 }
681 ]
682 },
683 "object-binding-element": {
684 "patterns": [
685 {
686 "include": "#comment"
687 },
688 {
689 "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*(:))",
690 "end": "(?=,|\\})",
691 "patterns": [
692 {
693 "include": "#object-binding-element-propertyName"
694 },
695 {
696 "include": "#binding-element"
697 }
698 ]
699 },
700 {
701 "include": "#object-binding-pattern"
702 },
703 {
704 "include": "#destructuring-variable-rest"
705 },
706 {
707 "include": "#variable-initializer"
708 },
709 {
710 "include": "#punctuation-comma"
711 }
712 ]
713 },
714 "object-binding-element-const": {
715 "patterns": [
716 {
717 "include": "#comment"
718 },
719 {
720 "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*(:))",
721 "end": "(?=,|\\})",
722 "patterns": [
723 {
724 "include": "#object-binding-element-propertyName"
725 },
726 {
727 "include": "#binding-element-const"
728 }
729 ]
730 },
731 {
732 "include": "#object-binding-pattern-const"
733 },
734 {
735 "include": "#destructuring-variable-rest-const"
736 },
737 {
738 "include": "#variable-initializer"
739 },
740 {
741 "include": "#punctuation-comma"
742 }
743 ]
744 },
745 "object-binding-element-propertyName": {
746 "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*(:))",
747 "end": "(:)",
748 "endCaptures": {
749 "0": {
750 "name": "punctuation.destructuring.js"
751 }
752 },
753 "patterns": [
754 {
755 "include": "#string"
756 },
757 {
758 "include": "#array-literal"
759 },
760 {
761 "include": "#numeric-literal"
762 },
763 {
764 "name": "variable.object.property.js",
765 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
766 }
767 ]
768 },
769 "binding-element": {
770 "patterns": [
771 {
772 "include": "#comment"
773 },
774 {
775 "include": "#string"
776 },
777 {
778 "include": "#numeric-literal"
779 },
780 {
781 "include": "#regex"
782 },
783 {
784 "include": "#object-binding-pattern"
785 },
786 {
787 "include": "#array-binding-pattern"
788 },
789 {
790 "include": "#destructuring-variable-rest"
791 },
792 {
793 "include": "#variable-initializer"
794 }
795 ]
796 },
797 "binding-element-const": {
798 "patterns": [
799 {
800 "include": "#comment"
801 },
802 {
803 "include": "#string"
804 },
805 {
806 "include": "#numeric-literal"
807 },
808 {
809 "include": "#regex"
810 },
811 {
812 "include": "#object-binding-pattern-const"
813 },
814 {
815 "include": "#array-binding-pattern-const"
816 },
817 {
818 "include": "#destructuring-variable-rest-const"
819 },
820 {
821 "include": "#variable-initializer"
822 }
823 ]
824 },
825 "destructuring-variable-rest": {
826 "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
827 "captures": {
828 "1": {
829 "name": "keyword.operator.rest.js"
830 },
831 "2": {
832 "name": "meta.definition.variable.js variable.other.readwrite.js"
833 }
834 }
835 },
836 "destructuring-variable-rest-const": {
837 "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
838 "captures": {
839 "1": {
840 "name": "keyword.operator.rest.js"
841 },
842 "2": {
843 "name": "meta.definition.variable.js variable.other.constant.js"
844 }
845 }
846 },
847 "object-binding-pattern": {
848 "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
849 "beginCaptures": {
850 "1": {
851 "name": "keyword.operator.rest.js"
852 },
853 "2": {
854 "name": "punctuation.definition.binding-pattern.object.js"
855 }
856 },
857 "end": "\\}",
858 "endCaptures": {
859 "0": {
860 "name": "punctuation.definition.binding-pattern.object.js"
861 }
862 },
863 "patterns": [
864 {
865 "include": "#object-binding-element"
866 }
867 ]
868 },
869 "object-binding-pattern-const": {
870 "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
871 "beginCaptures": {
872 "1": {
873 "name": "keyword.operator.rest.js"
874 },
875 "2": {
876 "name": "punctuation.definition.binding-pattern.object.js"
877 }
878 },
879 "end": "\\}",
880 "endCaptures": {
881 "0": {
882 "name": "punctuation.definition.binding-pattern.object.js"
883 }
884 },
885 "patterns": [
886 {
887 "include": "#object-binding-element-const"
888 }
889 ]
890 },
891 "array-binding-pattern": {
892 "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
893 "beginCaptures": {
894 "1": {
895 "name": "keyword.operator.rest.js"
896 },
897 "2": {
898 "name": "punctuation.definition.binding-pattern.array.js"
899 }
900 },
901 "end": "\\]",
902 "endCaptures": {
903 "0": {
904 "name": "punctuation.definition.binding-pattern.array.js"
905 }
906 },
907 "patterns": [
908 {
909 "include": "#binding-element"
910 },
911 {
912 "include": "#punctuation-comma"
913 }
914 ]
915 },
916 "array-binding-pattern-const": {
917 "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
918 "beginCaptures": {
919 "1": {
920 "name": "keyword.operator.rest.js"
921 },
922 "2": {
923 "name": "punctuation.definition.binding-pattern.array.js"
924 }
925 },
926 "end": "\\]",
927 "endCaptures": {
928 "0": {
929 "name": "punctuation.definition.binding-pattern.array.js"
930 }
931 },
932 "patterns": [
933 {
934 "include": "#binding-element-const"
935 },
936 {
937 "include": "#punctuation-comma"
938 }
939 ]
940 },
941 "parameter-name": {
942 "patterns": [
943 {
944 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)",
945 "captures": {
946 "1": {
947 "name": "storage.modifier.js"
948 }
949 }
950 },
951 {
952 "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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
953 "captures": {
954 "1": {
955 "name": "storage.modifier.js"
956 },
957 "2": {
958 "name": "keyword.operator.rest.js"
959 },
960 "3": {
961 "name": "entity.name.function.js variable.language.this.js"
962 },
963 "4": {
964 "name": "entity.name.function.js"
965 },
966 "5": {
967 "name": "keyword.operator.optional.js"
968 }
969 }
970 },
971 {
972 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)",
973 "captures": {
974 "1": {
975 "name": "storage.modifier.js"
976 },
977 "2": {
978 "name": "keyword.operator.rest.js"
979 },
980 "3": {
981 "name": "variable.parameter.js variable.language.this.js"
982 },
983 "4": {
984 "name": "variable.parameter.js"
985 },
986 "5": {
987 "name": "keyword.operator.optional.js"
988 }
989 }
990 }
991 ]
992 },
993 "destructuring-parameter": {
994 "patterns": [
995 {
996 "name": "meta.parameter.object-binding-pattern.js",
997 "begin": "(?<!=|:)\\s*(?:(\\.\\.\\.)\\s*)?(\\{)",
998 "beginCaptures": {
999 "1": {
1000 "name": "keyword.operator.rest.js"
1001 },
1002 "2": {
1003 "name": "punctuation.definition.binding-pattern.object.js"
1004 }
1005 },
1006 "end": "\\}",
1007 "endCaptures": {
1008 "0": {
1009 "name": "punctuation.definition.binding-pattern.object.js"
1010 }
1011 },
1012 "patterns": [
1013 {
1014 "include": "#parameter-object-binding-element"
1015 }
1016 ]
1017 },
1018 {
1019 "name": "meta.paramter.array-binding-pattern.js",
1020 "begin": "(?<!=|:)\\s*(?:(\\.\\.\\.)\\s*)?(\\[)",
1021 "beginCaptures": {
1022 "1": {
1023 "name": "keyword.operator.rest.js"
1024 },
1025 "2": {
1026 "name": "punctuation.definition.binding-pattern.array.js"
1027 }
1028 },
1029 "end": "\\]",
1030 "endCaptures": {
1031 "0": {
1032 "name": "punctuation.definition.binding-pattern.array.js"
1033 }
1034 },
1035 "patterns": [
1036 {
1037 "include": "#parameter-binding-element"
1038 },
1039 {
1040 "include": "#punctuation-comma"
1041 }
1042 ]
1043 }
1044 ]
1045 },
1046 "parameter-object-binding-element": {
1047 "patterns": [
1048 {
1049 "include": "#comment"
1050 },
1051 {
1052 "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*(:))",
1053 "end": "(?=,|\\})",
1054 "patterns": [
1055 {
1056 "include": "#object-binding-element-propertyName"
1057 },
1058 {
1059 "include": "#parameter-binding-element"
1060 },
1061 {
1062 "include": "#paren-expression"
1063 }
1064 ]
1065 },
1066 {
1067 "include": "#parameter-object-binding-pattern"
1068 },
1069 {
1070 "include": "#destructuring-parameter-rest"
1071 },
1072 {
1073 "include": "#variable-initializer"
1074 },
1075 {
1076 "include": "#punctuation-comma"
1077 }
1078 ]
1079 },
1080 "parameter-binding-element": {
1081 "patterns": [
1082 {
1083 "include": "#comment"
1084 },
1085 {
1086 "include": "#string"
1087 },
1088 {
1089 "include": "#numeric-literal"
1090 },
1091 {
1092 "include": "#regex"
1093 },
1094 {
1095 "include": "#parameter-object-binding-pattern"
1096 },
1097 {
1098 "include": "#parameter-array-binding-pattern"
1099 },
1100 {
1101 "include": "#destructuring-parameter-rest"
1102 },
1103 {
1104 "include": "#variable-initializer"
1105 }
1106 ]
1107 },
1108 "destructuring-parameter-rest": {
1109 "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
1110 "captures": {
1111 "1": {
1112 "name": "keyword.operator.rest.js"
1113 },
1114 "2": {
1115 "name": "variable.parameter.js"
1116 }
1117 }
1118 },
1119 "parameter-object-binding-pattern": {
1120 "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
1121 "beginCaptures": {
1122 "1": {
1123 "name": "keyword.operator.rest.js"
1124 },
1125 "2": {
1126 "name": "punctuation.definition.binding-pattern.object.js"
1127 }
1128 },
1129 "end": "\\}",
1130 "endCaptures": {
1131 "0": {
1132 "name": "punctuation.definition.binding-pattern.object.js"
1133 }
1134 },
1135 "patterns": [
1136 {
1137 "include": "#parameter-object-binding-element"
1138 }
1139 ]
1140 },
1141 "parameter-array-binding-pattern": {
1142 "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
1143 "beginCaptures": {
1144 "1": {
1145 "name": "keyword.operator.rest.js"
1146 },
1147 "2": {
1148 "name": "punctuation.definition.binding-pattern.array.js"
1149 }
1150 },
1151 "end": "\\]",
1152 "endCaptures": {
1153 "0": {
1154 "name": "punctuation.definition.binding-pattern.array.js"
1155 }
1156 },
1157 "patterns": [
1158 {
1159 "include": "#parameter-binding-element"
1160 },
1161 {
1162 "include": "#punctuation-comma"
1163 }
1164 ]
1165 },
1166 "field-declaration": {
1167 "name": "meta.field.declaration.js",
1168 "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*)?(=|:|;|,|\\}|$))",
1169 "beginCaptures": {
1170 "1": {
1171 "name": "storage.modifier.js"
1172 }
1173 },
1174 "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*)?(=|:|;|,|$))))|(?<=\\})",
1175 "patterns": [
1176 {
1177 "include": "#variable-initializer"
1178 },
1179 {
1180 "include": "#type-annotation"
1181 },
1182 {
1183 "include": "#string"
1184 },
1185 {
1186 "include": "#array-literal"
1187 },
1188 {
1189 "include": "#numeric-literal"
1190 },
1191 {
1192 "include": "#comment"
1193 },
1194 {
1195 "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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
1196 "captures": {
1197 "1": {
1198 "name": "meta.definition.property.js entity.name.function.js"
1199 },
1200 "2": {
1201 "name": "keyword.operator.optional.js"
1202 },
1203 "3": {
1204 "name": "keyword.operator.definiteassignment.js"
1205 }
1206 }
1207 },
1208 {
1209 "name": "meta.definition.property.js variable.object.property.js",
1210 "match": "\\#?[_$[:alpha:]][_$[:alnum:]]*"
1211 },
1212 {
1213 "name": "keyword.operator.optional.js",
1214 "match": "\\?"
1215 },
1216 {
1217 "name": "keyword.operator.definiteassignment.js",
1218 "match": "\\!"
1219 }
1220 ]
1221 },
1222 "variable-initializer": {
1223 "patterns": [
1224 {
1225 "begin": "(?<!=|!)(=)(?!=)(?=\\s*\\S)(?!\\s*.*=>\\s*$)",
1226 "beginCaptures": {
1227 "1": {
1228 "name": "keyword.operator.assignment.js"
1229 }
1230 },
1231 "end": "(?=$|^|[,);}\\]]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
1232 "patterns": [
1233 {
1234 "include": "#expression"
1235 }
1236 ]
1237 },
1238 {
1239 "begin": "(?<!=|!)(=)(?!=)",
1240 "beginCaptures": {
1241 "1": {
1242 "name": "keyword.operator.assignment.js"
1243 }
1244 },
1245 "end": "(?=[,);}\\]]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))|(?=^\\s*$)|(?<![\\|\\&\\+\\-\\*\\/])(?<=\\S)(?<!=)(?=\\s*$)",
1246 "patterns": [
1247 {
1248 "include": "#expression"
1249 }
1250 ]
1251 }
1252 ]
1253 },
1254 "function-declaration": {
1255 "name": "meta.function.js",
1256 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
1257 "beginCaptures": {
1258 "1": {
1259 "name": "keyword.control.export.js"
1260 },
1261 "2": {
1262 "name": "storage.modifier.js"
1263 },
1264 "3": {
1265 "name": "storage.modifier.async.js"
1266 },
1267 "4": {
1268 "name": "storage.type.function.js"
1269 },
1270 "5": {
1271 "name": "keyword.generator.asterisk.js"
1272 },
1273 "6": {
1274 "name": "meta.definition.function.js entity.name.function.js"
1275 }
1276 },
1277 "end": "(?=;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))|(?<=\\})",
1278 "patterns": [
1279 {
1280 "include": "#function-name"
1281 },
1282 {
1283 "include": "#function-body"
1284 }
1285 ]
1286 },
1287 "function-expression": {
1288 "name": "meta.function.expression.js",
1289 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
1290 "beginCaptures": {
1291 "1": {
1292 "name": "storage.modifier.async.js"
1293 },
1294 "2": {
1295 "name": "storage.type.function.js"
1296 },
1297 "3": {
1298 "name": "keyword.generator.asterisk.js"
1299 },
1300 "4": {
1301 "name": "meta.definition.function.js entity.name.function.js"
1302 }
1303 },
1304 "end": "(?=;)|(?<=\\})",
1305 "patterns": [
1306 {
1307 "include": "#function-name"
1308 },
1309 {
1310 "include": "#single-line-comment-consuming-line-ending"
1311 },
1312 {
1313 "include": "#function-body"
1314 }
1315 ]
1316 },
1317 "function-name": {
1318 "name": "meta.definition.function.js entity.name.function.js",
1319 "match": "[_$[:alpha:]][_$[:alnum:]]*"
1320 },
1321 "function-body": {
1322 "patterns": [
1323 {
1324 "include": "#comment"
1325 },
1326 {
1327 "include": "#type-parameters"
1328 },
1329 {
1330 "include": "#function-parameters"
1331 },
1332 {
1333 "include": "#return-type"
1334 },
1335 {
1336 "include": "#type-function-return-type"
1337 },
1338 {
1339 "include": "#decl-block"
1340 },
1341 {
1342 "name": "keyword.generator.asterisk.js",
1343 "match": "\\*"
1344 }
1345 ]
1346 },
1347 "method-declaration": {
1348 "patterns": [
1349 {
1350 "name": "meta.method.declaration.js",
1351 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?\\s*\\b(constructor)\\b(?!:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1352 "beginCaptures": {
1353 "1": {
1354 "name": "storage.modifier.js"
1355 },
1356 "2": {
1357 "name": "storage.modifier.js"
1358 },
1359 "3": {
1360 "name": "storage.modifier.js"
1361 },
1362 "4": {
1363 "name": "storage.modifier.async.js"
1364 },
1365 "5": {
1366 "name": "storage.type.js"
1367 }
1368 },
1369 "end": "(?=\\}|;|,|$)|(?<=\\})",
1370 "patterns": [
1371 {
1372 "include": "#method-declaration-name"
1373 },
1374 {
1375 "include": "#function-body"
1376 }
1377 ]
1378 },
1379 {
1380 "name": "meta.method.declaration.js",
1381 "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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])",
1382 "beginCaptures": {
1383 "1": {
1384 "name": "storage.modifier.js"
1385 },
1386 "2": {
1387 "name": "storage.modifier.js"
1388 },
1389 "3": {
1390 "name": "storage.modifier.js"
1391 },
1392 "4": {
1393 "name": "storage.modifier.async.js"
1394 },
1395 "5": {
1396 "name": "keyword.operator.new.js"
1397 },
1398 "6": {
1399 "name": "keyword.generator.asterisk.js"
1400 }
1401 },
1402 "end": "(?=\\}|;|,|$)|(?<=\\})",
1403 "patterns": [
1404 {
1405 "include": "#method-declaration-name"
1406 },
1407 {
1408 "include": "#function-body"
1409 }
1410 ]
1411 },
1412 {
1413 "name": "meta.method.declaration.js",
1414 "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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])",
1415 "beginCaptures": {
1416 "1": {
1417 "name": "storage.modifier.js"
1418 },
1419 "2": {
1420 "name": "storage.modifier.js"
1421 },
1422 "3": {
1423 "name": "storage.modifier.js"
1424 },
1425 "4": {
1426 "name": "storage.modifier.async.js"
1427 },
1428 "5": {
1429 "name": "storage.type.property.js"
1430 },
1431 "6": {
1432 "name": "keyword.generator.asterisk.js"
1433 }
1434 },
1435 "end": "(?=\\}|;|,|$)|(?<=\\})",
1436 "patterns": [
1437 {
1438 "include": "#method-declaration-name"
1439 },
1440 {
1441 "include": "#function-body"
1442 }
1443 ]
1444 }
1445 ]
1446 },
1447 "object-literal-method-declaration": {
1448 "name": "meta.method.declaration.js",
1449 "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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])",
1450 "beginCaptures": {
1451 "1": {
1452 "name": "storage.modifier.async.js"
1453 },
1454 "2": {
1455 "name": "storage.type.property.js"
1456 },
1457 "3": {
1458 "name": "keyword.generator.asterisk.js"
1459 }
1460 },
1461 "end": "(?=\\}|;|,)|(?<=\\})",
1462 "patterns": [
1463 {
1464 "include": "#method-declaration-name"
1465 },
1466 {
1467 "include": "#function-body"
1468 },
1469 {
1470 "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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])",
1471 "beginCaptures": {
1472 "1": {
1473 "name": "storage.modifier.async.js"
1474 },
1475 "2": {
1476 "name": "storage.type.property.js"
1477 },
1478 "3": {
1479 "name": "keyword.generator.asterisk.js"
1480 }
1481 },
1482 "end": "(?=\\(|\\<)",
1483 "patterns": [
1484 {
1485 "include": "#method-declaration-name"
1486 }
1487 ]
1488 }
1489 ]
1490 },
1491 "method-declaration-name": {
1492 "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*[\\(\\<])",
1493 "end": "(?=\\(|\\<)",
1494 "patterns": [
1495 {
1496 "include": "#string"
1497 },
1498 {
1499 "include": "#array-literal"
1500 },
1501 {
1502 "include": "#numeric-literal"
1503 },
1504 {
1505 "name": "meta.definition.method.js entity.name.function.js",
1506 "match": "[_$[:alpha:]][_$[:alnum:]]*"
1507 },
1508 {
1509 "name": "keyword.operator.optional.js",
1510 "match": "\\?"
1511 }
1512 ]
1513 },
1514 "arrow-function": {
1515 "patterns": [
1516 {
1517 "name": "meta.arrow.js",
1518 "match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?==>)",
1519 "captures": {
1520 "1": {
1521 "name": "storage.modifier.async.js"
1522 },
1523 "2": {
1524 "name": "variable.parameter.js"
1525 }
1526 }
1527 },
1528 {
1529 "name": "meta.arrow.js",
1530 "begin": "(?x) (?:\n (?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\n)? ((?<![})!\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)",
1531 "beginCaptures": {
1532 "1": {
1533 "name": "storage.modifier.async.js"
1534 }
1535 },
1536 "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
1537 "patterns": [
1538 {
1539 "include": "#comment"
1540 },
1541 {
1542 "include": "#type-parameters"
1543 },
1544 {
1545 "include": "#function-parameters"
1546 },
1547 {
1548 "include": "#arrow-return-type"
1549 },
1550 {
1551 "include": "#possibly-arrow-return-type"
1552 }
1553 ]
1554 },
1555 {
1556 "name": "meta.arrow.js",
1557 "begin": "=>",
1558 "beginCaptures": {
1559 "0": {
1560 "name": "storage.type.function.arrow.js"
1561 }
1562 },
1563 "end": "((?<=\\}|\\S)(?<!=>)|((?!\\{)(?=\\S)))(?!\\/[\\/\\*])",
1564 "patterns": [
1565 {
1566 "include": "#single-line-comment-consuming-line-ending"
1567 },
1568 {
1569 "include": "#decl-block"
1570 },
1571 {
1572 "include": "#expression"
1573 }
1574 ]
1575 }
1576 ]
1577 },
1578 "indexer-declaration": {
1579 "name": "meta.indexer.declaration.js",
1580 "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s*)?\\s*(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)",
1581 "beginCaptures": {
1582 "1": {
1583 "name": "storage.modifier.js"
1584 },
1585 "2": {
1586 "name": "meta.brace.square.js"
1587 },
1588 "3": {
1589 "name": "variable.parameter.js"
1590 }
1591 },
1592 "end": "(\\])\\s*(\\?\\s*)?|$",
1593 "endCaptures": {
1594 "1": {
1595 "name": "meta.brace.square.js"
1596 },
1597 "2": {
1598 "name": "keyword.operator.optional.js"
1599 }
1600 },
1601 "patterns": [
1602 {
1603 "include": "#type-annotation"
1604 }
1605 ]
1606 },
1607 "indexer-mapped-type-declaration": {
1608 "name": "meta.indexer.mappedtype.declaration.js",
1609 "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([+-])?(readonly)\\s*)?\\s*(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s+(in)\\s+",
1610 "beginCaptures": {
1611 "1": {
1612 "name": "keyword.operator.type.modifier.js"
1613 },
1614 "2": {
1615 "name": "storage.modifier.js"
1616 },
1617 "3": {
1618 "name": "meta.brace.square.js"
1619 },
1620 "4": {
1621 "name": "entity.name.type.js"
1622 },
1623 "5": {
1624 "name": "keyword.operator.expression.in.js"
1625 }
1626 },
1627 "end": "(\\])([+-])?\\s*(\\?\\s*)?|$",
1628 "endCaptures": {
1629 "1": {
1630 "name": "meta.brace.square.js"
1631 },
1632 "2": {
1633 "name": "keyword.operator.type.modifier.js"
1634 },
1635 "3": {
1636 "name": "keyword.operator.optional.js"
1637 }
1638 },
1639 "patterns": [
1640 {
1641 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+",
1642 "captures": {
1643 "1": {
1644 "name": "keyword.control.as.js"
1645 }
1646 }
1647 },
1648 {
1649 "include": "#type"
1650 }
1651 ]
1652 },
1653 "function-parameters": {
1654 "name": "meta.parameters.js",
1655 "begin": "\\(",
1656 "beginCaptures": {
1657 "0": {
1658 "name": "punctuation.definition.parameters.begin.js"
1659 }
1660 },
1661 "end": "\\)",
1662 "endCaptures": {
1663 "0": {
1664 "name": "punctuation.definition.parameters.end.js"
1665 }
1666 },
1667 "patterns": [
1668 {
1669 "include": "#function-parameters-body"
1670 }
1671 ]
1672 },
1673 "function-parameters-body": {
1674 "patterns": [
1675 {
1676 "include": "#comment"
1677 },
1678 {
1679 "include": "#string"
1680 },
1681 {
1682 "include": "#decorator"
1683 },
1684 {
1685 "include": "#destructuring-parameter"
1686 },
1687 {
1688 "include": "#parameter-name"
1689 },
1690 {
1691 "include": "#parameter-type-annotation"
1692 },
1693 {
1694 "include": "#variable-initializer"
1695 },
1696 {
1697 "name": "punctuation.separator.parameter.js",
1698 "match": ","
1699 }
1700 ]
1701 },
1702 "class-declaration": {
1703 "name": "meta.class.js",
1704 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(?:(abstract)\\s+)?\\b(class)\\b(?=\\s+|/[/*])",
1705 "beginCaptures": {
1706 "1": {
1707 "name": "keyword.control.export.js"
1708 },
1709 "2": {
1710 "name": "storage.modifier.js"
1711 },
1712 "3": {
1713 "name": "storage.modifier.js"
1714 },
1715 "4": {
1716 "name": "storage.type.class.js"
1717 }
1718 },
1719 "end": "(?<=\\})",
1720 "patterns": [
1721 {
1722 "include": "#class-declaration-or-expression-patterns"
1723 }
1724 ]
1725 },
1726 "class-expression": {
1727 "name": "meta.class.js",
1728 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(class)\\b(?=\\s+|[<{]|\\/[\\/*])",
1729 "beginCaptures": {
1730 "1": {
1731 "name": "storage.modifier.js"
1732 },
1733 "2": {
1734 "name": "storage.type.class.js"
1735 }
1736 },
1737 "end": "(?<=\\})",
1738 "patterns": [
1739 {
1740 "include": "#class-declaration-or-expression-patterns"
1741 }
1742 ]
1743 },
1744 "class-declaration-or-expression-patterns": {
1745 "patterns": [
1746 {
1747 "include": "#comment"
1748 },
1749 {
1750 "include": "#class-or-interface-heritage"
1751 },
1752 {
1753 "match": "[_$[:alpha:]][_$[:alnum:]]*",
1754 "captures": {
1755 "0": {
1756 "name": "entity.name.type.class.js"
1757 }
1758 }
1759 },
1760 {
1761 "include": "#type-parameters"
1762 },
1763 {
1764 "include": "#class-or-interface-body"
1765 }
1766 ]
1767 },
1768 "interface-declaration": {
1769 "name": "meta.interface.js",
1770 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(?:(abstract)\\s+)?\\b(interface)\\b(?=\\s+|/[/*])",
1771 "beginCaptures": {
1772 "1": {
1773 "name": "keyword.control.export.js"
1774 },
1775 "2": {
1776 "name": "storage.modifier.js"
1777 },
1778 "3": {
1779 "name": "storage.modifier.js"
1780 },
1781 "4": {
1782 "name": "storage.type.interface.js"
1783 }
1784 },
1785 "end": "(?<=\\})",
1786 "patterns": [
1787 {
1788 "include": "#comment"
1789 },
1790 {
1791 "include": "#class-or-interface-heritage"
1792 },
1793 {
1794 "match": "[_$[:alpha:]][_$[:alnum:]]*",
1795 "captures": {
1796 "0": {
1797 "name": "entity.name.type.interface.js"
1798 }
1799 }
1800 },
1801 {
1802 "include": "#type-parameters"
1803 },
1804 {
1805 "include": "#class-or-interface-body"
1806 }
1807 ]
1808 },
1809 "class-or-interface-heritage": {
1810 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(extends|implements)\\b)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1811 "beginCaptures": {
1812 "1": {
1813 "name": "storage.modifier.js"
1814 }
1815 },
1816 "end": "(?=\\{)",
1817 "patterns": [
1818 {
1819 "include": "#comment"
1820 },
1821 {
1822 "include": "#class-or-interface-heritage"
1823 },
1824 {
1825 "include": "#type-parameters"
1826 },
1827 {
1828 "include": "#expressionWithoutIdentifiers"
1829 },
1830 {
1831 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s*\\??\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)*\\s*)",
1832 "captures": {
1833 "1": {
1834 "name": "entity.name.type.module.js"
1835 },
1836 "2": {
1837 "name": "punctuation.accessor.js"
1838 },
1839 "3": {
1840 "name": "punctuation.accessor.optional.js"
1841 }
1842 }
1843 },
1844 {
1845 "match": "([_$[:alpha:]][_$[:alnum:]]*)",
1846 "captures": {
1847 "1": {
1848 "name": "entity.other.inherited-class.js"
1849 }
1850 }
1851 },
1852 {
1853 "include": "#expressionPunctuations"
1854 }
1855 ]
1856 },
1857 "class-or-interface-body": {
1858 "begin": "\\{",
1859 "beginCaptures": {
1860 "0": {
1861 "name": "punctuation.definition.block.js"
1862 }
1863 },
1864 "end": "\\}",
1865 "endCaptures": {
1866 "0": {
1867 "name": "punctuation.definition.block.js"
1868 }
1869 },
1870 "patterns": [
1871 {
1872 "include": "#comment"
1873 },
1874 {
1875 "include": "#decorator"
1876 },
1877 {
1878 "begin": "(?<=:)\\s*",
1879 "end": "(?=\\s|[;),}\\]:\\-\\+]|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))",
1880 "patterns": [
1881 {
1882 "include": "#expression"
1883 }
1884 ]
1885 },
1886 {
1887 "include": "#method-declaration"
1888 },
1889 {
1890 "include": "#indexer-declaration"
1891 },
1892 {
1893 "include": "#field-declaration"
1894 },
1895 {
1896 "include": "#string"
1897 },
1898 {
1899 "include": "#type-annotation"
1900 },
1901 {
1902 "include": "#variable-initializer"
1903 },
1904 {
1905 "include": "#access-modifier"
1906 },
1907 {
1908 "include": "#property-accessor"
1909 },
1910 {
1911 "include": "#async-modifier"
1912 },
1913 {
1914 "include": "#after-operator-block-as-object-literal"
1915 },
1916 {
1917 "include": "#decl-block"
1918 },
1919 {
1920 "include": "#expression"
1921 },
1922 {
1923 "include": "#punctuation-comma"
1924 },
1925 {
1926 "include": "#punctuation-semicolon"
1927 }
1928 ]
1929 },
1930 "access-modifier": {
1931 "name": "storage.modifier.js",
1932 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|declare|override|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1933 },
1934 "property-accessor": {
1935 "name": "storage.type.property.js",
1936 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(accessor|get|set)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1937 },
1938 "async-modifier": {
1939 "name": "storage.modifier.async.js",
1940 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(async)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1941 },
1942 "enum-declaration": {
1943 "name": "meta.enum.declaration.js",
1944 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
1945 "beginCaptures": {
1946 "1": {
1947 "name": "keyword.control.export.js"
1948 },
1949 "2": {
1950 "name": "storage.modifier.js"
1951 },
1952 "3": {
1953 "name": "storage.modifier.js"
1954 },
1955 "4": {
1956 "name": "storage.type.enum.js"
1957 },
1958 "5": {
1959 "name": "entity.name.type.enum.js"
1960 }
1961 },
1962 "end": "(?<=\\})",
1963 "patterns": [
1964 {
1965 "include": "#comment"
1966 },
1967 {
1968 "begin": "\\{",
1969 "beginCaptures": {
1970 "0": {
1971 "name": "punctuation.definition.block.js"
1972 }
1973 },
1974 "end": "\\}",
1975 "endCaptures": {
1976 "0": {
1977 "name": "punctuation.definition.block.js"
1978 }
1979 },
1980 "patterns": [
1981 {
1982 "include": "#comment"
1983 },
1984 {
1985 "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
1986 "beginCaptures": {
1987 "0": {
1988 "name": "variable.other.enummember.js"
1989 }
1990 },
1991 "end": "(?=,|\\}|$)",
1992 "patterns": [
1993 {
1994 "include": "#comment"
1995 },
1996 {
1997 "include": "#variable-initializer"
1998 }
1999 ]
2000 },
2001 {
2002 "begin": "(?=((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))",
2003 "end": "(?=,|\\}|$)",
2004 "patterns": [
2005 {
2006 "include": "#string"
2007 },
2008 {
2009 "include": "#array-literal"
2010 },
2011 {
2012 "include": "#comment"
2013 },
2014 {
2015 "include": "#variable-initializer"
2016 }
2017 ]
2018 },
2019 {
2020 "include": "#punctuation-comma"
2021 }
2022 ]
2023 }
2024 ]
2025 },
2026 "namespace-declaration": {
2027 "name": "meta.namespace.declaration.js",
2028 "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(namespace|module)\\s+(?=[_$[:alpha:]\"'`]))",
2029 "beginCaptures": {
2030 "1": {
2031 "name": "keyword.control.export.js"
2032 },
2033 "2": {
2034 "name": "storage.modifier.js"
2035 },
2036 "3": {
2037 "name": "storage.type.namespace.js"
2038 }
2039 },
2040 "end": "(?<=\\})|(?=;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))",
2041 "patterns": [
2042 {
2043 "include": "#comment"
2044 },
2045 {
2046 "include": "#string"
2047 },
2048 {
2049 "name": "entity.name.type.module.js",
2050 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
2051 },
2052 {
2053 "include": "#punctuation-accessor"
2054 },
2055 {
2056 "include": "#decl-block"
2057 }
2058 ]
2059 },
2060 "type-alias-declaration": {
2061 "name": "meta.type.declaration.js",
2062 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*",
2063 "beginCaptures": {
2064 "1": {
2065 "name": "keyword.control.export.js"
2066 },
2067 "2": {
2068 "name": "storage.modifier.js"
2069 },
2070 "3": {
2071 "name": "storage.type.type.js"
2072 },
2073 "4": {
2074 "name": "entity.name.type.alias.js"
2075 }
2076 },
2077 "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))",
2078 "patterns": [
2079 {
2080 "include": "#comment"
2081 },
2082 {
2083 "include": "#type-parameters"
2084 },
2085 {
2086 "begin": "(=)\\s*(intrinsic)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2087 "beginCaptures": {
2088 "1": {
2089 "name": "keyword.operator.assignment.js"
2090 },
2091 "2": {
2092 "name": "keyword.control.intrinsic.js"
2093 }
2094 },
2095 "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))",
2096 "patterns": [
2097 {
2098 "include": "#type"
2099 }
2100 ]
2101 },
2102 {
2103 "begin": "(=)\\s*",
2104 "beginCaptures": {
2105 "1": {
2106 "name": "keyword.operator.assignment.js"
2107 }
2108 },
2109 "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))",
2110 "patterns": [
2111 {
2112 "include": "#type"
2113 }
2114 ]
2115 }
2116 ]
2117 },
2118 "import-equals-declaration": {
2119 "patterns": [
2120 {
2121 "name": "meta.import-equals.external.js",
2122 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()",
2123 "beginCaptures": {
2124 "1": {
2125 "name": "keyword.control.export.js"
2126 },
2127 "2": {
2128 "name": "storage.modifier.js"
2129 },
2130 "3": {
2131 "name": "keyword.control.import.js"
2132 },
2133 "4": {
2134 "name": "keyword.control.type.js"
2135 },
2136 "5": {
2137 "name": "variable.other.readwrite.alias.js"
2138 },
2139 "6": {
2140 "name": "keyword.operator.assignment.js"
2141 },
2142 "7": {
2143 "name": "keyword.control.require.js"
2144 },
2145 "8": {
2146 "name": "meta.brace.round.js"
2147 }
2148 },
2149 "end": "\\)",
2150 "endCaptures": {
2151 "0": {
2152 "name": "meta.brace.round.js"
2153 }
2154 },
2155 "patterns": [
2156 {
2157 "include": "#comment"
2158 },
2159 {
2160 "include": "#string"
2161 }
2162 ]
2163 },
2164 {
2165 "name": "meta.import-equals.internal.js",
2166 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(?!require\\b)",
2167 "beginCaptures": {
2168 "1": {
2169 "name": "keyword.control.export.js"
2170 },
2171 "2": {
2172 "name": "storage.modifier.js"
2173 },
2174 "3": {
2175 "name": "keyword.control.import.js"
2176 },
2177 "4": {
2178 "name": "keyword.control.type.js"
2179 },
2180 "5": {
2181 "name": "variable.other.readwrite.alias.js"
2182 },
2183 "6": {
2184 "name": "keyword.operator.assignment.js"
2185 }
2186 },
2187 "end": "(?=;|$|^)",
2188 "patterns": [
2189 {
2190 "include": "#single-line-comment-consuming-line-ending"
2191 },
2192 {
2193 "include": "#comment"
2194 },
2195 {
2196 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))",
2197 "captures": {
2198 "1": {
2199 "name": "entity.name.type.module.js"
2200 },
2201 "2": {
2202 "name": "punctuation.accessor.js"
2203 },
2204 "3": {
2205 "name": "punctuation.accessor.optional.js"
2206 }
2207 }
2208 },
2209 {
2210 "name": "variable.other.readwrite.js",
2211 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
2212 }
2213 ]
2214 }
2215 ]
2216 },
2217 "import-declaration": {
2218 "name": "meta.import.js",
2219 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type)(?!\\s+from))?(?!\\s*[:\\(])(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2220 "beginCaptures": {
2221 "1": {
2222 "name": "keyword.control.export.js"
2223 },
2224 "2": {
2225 "name": "storage.modifier.js"
2226 },
2227 "3": {
2228 "name": "keyword.control.import.js"
2229 },
2230 "4": {
2231 "name": "keyword.control.type.js"
2232 }
2233 },
2234 "end": "(?<!^import|[^\\._$[:alnum:]]import)(?=;|$|^)",
2235 "patterns": [
2236 {
2237 "include": "#single-line-comment-consuming-line-ending"
2238 },
2239 {
2240 "include": "#comment"
2241 },
2242 {
2243 "include": "#string"
2244 },
2245 {
2246 "begin": "(?<=^import|[^\\._$[:alnum:]]import)(?!\\s*[\"'])",
2247 "end": "\\bfrom\\b",
2248 "endCaptures": {
2249 "0": {
2250 "name": "keyword.control.from.js"
2251 }
2252 },
2253 "patterns": [
2254 {
2255 "include": "#import-export-declaration"
2256 }
2257 ]
2258 },
2259 {
2260 "include": "#import-export-declaration"
2261 }
2262 ]
2263 },
2264 "export-declaration": {
2265 "patterns": [
2266 {
2267 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)\\s+(as)\\s+(namespace)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
2268 "captures": {
2269 "1": {
2270 "name": "keyword.control.export.js"
2271 },
2272 "2": {
2273 "name": "keyword.control.as.js"
2274 },
2275 "3": {
2276 "name": "storage.type.namespace.js"
2277 },
2278 "4": {
2279 "name": "entity.name.type.module.js"
2280 }
2281 }
2282 },
2283 {
2284 "name": "meta.export.default.js",
2285 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))",
2286 "beginCaptures": {
2287 "1": {
2288 "name": "keyword.control.export.js"
2289 },
2290 "2": {
2291 "name": "keyword.control.type.js"
2292 },
2293 "3": {
2294 "name": "keyword.operator.assignment.js"
2295 },
2296 "4": {
2297 "name": "keyword.control.default.js"
2298 }
2299 },
2300 "end": "(?=$|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))",
2301 "patterns": [
2302 {
2303 "include": "#interface-declaration"
2304 },
2305 {
2306 "include": "#expression"
2307 }
2308 ]
2309 },
2310 {
2311 "name": "meta.export.js",
2312 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?\\b(?!(\\$)|(\\s*:))((?=\\s*[\\{*])|((?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s|,))(?!\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))",
2313 "beginCaptures": {
2314 "1": {
2315 "name": "keyword.control.export.js"
2316 },
2317 "2": {
2318 "name": "keyword.control.type.js"
2319 }
2320 },
2321 "end": "(?=$|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))",
2322 "patterns": [
2323 {
2324 "include": "#import-export-declaration"
2325 }
2326 ]
2327 }
2328 ]
2329 },
2330 "import-export-declaration": {
2331 "patterns": [
2332 {
2333 "include": "#comment"
2334 },
2335 {
2336 "include": "#string"
2337 },
2338 {
2339 "include": "#import-export-block"
2340 },
2341 {
2342 "name": "keyword.control.from.js",
2343 "match": "\\bfrom\\b"
2344 },
2345 {
2346 "include": "#import-export-assert-clause"
2347 },
2348 {
2349 "include": "#import-export-clause"
2350 }
2351 ]
2352 },
2353 "import-export-assert-clause": {
2354 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(assert)\\s*(\\{)",
2355 "beginCaptures": {
2356 "1": {
2357 "name": "keyword.control.assert.js"
2358 },
2359 "2": {
2360 "name": "punctuation.definition.block.js"
2361 }
2362 },
2363 "end": "\\}",
2364 "endCaptures": {
2365 "0": {
2366 "name": "punctuation.definition.block.js"
2367 }
2368 },
2369 "patterns": [
2370 {
2371 "include": "#comment"
2372 },
2373 {
2374 "include": "#string"
2375 },
2376 {
2377 "name": "meta.object-literal.key.js",
2378 "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)"
2379 },
2380 {
2381 "name": "punctuation.separator.key-value.js",
2382 "match": ":"
2383 }
2384 ]
2385 },
2386 "import-export-block": {
2387 "name": "meta.block.js",
2388 "begin": "\\{",
2389 "beginCaptures": {
2390 "0": {
2391 "name": "punctuation.definition.block.js"
2392 }
2393 },
2394 "end": "\\}",
2395 "endCaptures": {
2396 "0": {
2397 "name": "punctuation.definition.block.js"
2398 }
2399 },
2400 "patterns": [
2401 {
2402 "include": "#import-export-clause"
2403 }
2404 ]
2405 },
2406 "import-export-clause": {
2407 "patterns": [
2408 {
2409 "include": "#comment"
2410 },
2411 {
2412 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(?:(\\btype)\\s+)?(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*)))\\s+(as)\\s+(?:(default(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|([_$[:alpha:]][_$[:alnum:]]*))",
2413 "captures": {
2414 "1": {
2415 "name": "keyword.control.type.js"
2416 },
2417 "2": {
2418 "name": "keyword.control.default.js"
2419 },
2420 "3": {
2421 "name": "constant.language.import-export-all.js"
2422 },
2423 "4": {
2424 "name": "variable.other.readwrite.js"
2425 },
2426 "5": {
2427 "name": "keyword.control.as.js"
2428 },
2429 "6": {
2430 "name": "keyword.control.default.js"
2431 },
2432 "7": {
2433 "name": "variable.other.readwrite.alias.js"
2434 }
2435 }
2436 },
2437 {
2438 "include": "#punctuation-comma"
2439 },
2440 {
2441 "name": "constant.language.import-export-all.js",
2442 "match": "\\*"
2443 },
2444 {
2445 "name": "keyword.control.default.js",
2446 "match": "\\b(default)\\b"
2447 },
2448 {
2449 "match": "(?:(\\btype)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)",
2450 "captures": {
2451 "1": {
2452 "name": "keyword.control.type.js"
2453 },
2454 "2": {
2455 "name": "variable.other.readwrite.alias.js"
2456 }
2457 }
2458 }
2459 ]
2460 },
2461 "switch-statement": {
2462 "name": "switch-statement.expr.js",
2463 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bswitch\\s*\\()",
2464 "end": "\\}",
2465 "endCaptures": {
2466 "0": {
2467 "name": "punctuation.definition.block.js"
2468 }
2469 },
2470 "patterns": [
2471 {
2472 "include": "#comment"
2473 },
2474 {
2475 "name": "switch-expression.expr.js",
2476 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(switch)\\s*(\\()",
2477 "beginCaptures": {
2478 "1": {
2479 "name": "keyword.control.switch.js"
2480 },
2481 "2": {
2482 "name": "meta.brace.round.js"
2483 }
2484 },
2485 "end": "\\)",
2486 "endCaptures": {
2487 "0": {
2488 "name": "meta.brace.round.js"
2489 }
2490 },
2491 "patterns": [
2492 {
2493 "include": "#expression"
2494 }
2495 ]
2496 },
2497 {
2498 "name": "switch-block.expr.js",
2499 "begin": "\\{",
2500 "beginCaptures": {
2501 "0": {
2502 "name": "punctuation.definition.block.js"
2503 }
2504 },
2505 "end": "(?=\\})",
2506 "patterns": [
2507 {
2508 "name": "case-clause.expr.js",
2509 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default(?=:))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2510 "beginCaptures": {
2511 "1": {
2512 "name": "keyword.control.switch.js"
2513 }
2514 },
2515 "end": "(?=:)",
2516 "patterns": [
2517 {
2518 "include": "#expression"
2519 }
2520 ]
2521 },
2522 {
2523 "begin": "(:)\\s*(\\{)",
2524 "beginCaptures": {
2525 "1": {
2526 "name": "case-clause.expr.js punctuation.definition.section.case-statement.js"
2527 },
2528 "2": {
2529 "name": "meta.block.js punctuation.definition.block.js"
2530 }
2531 },
2532 "end": "\\}",
2533 "endCaptures": {
2534 "0": {
2535 "name": "meta.block.js punctuation.definition.block.js"
2536 }
2537 },
2538 "contentName": "meta.block.js",
2539 "patterns": [
2540 {
2541 "include": "#statements"
2542 }
2543 ]
2544 },
2545 {
2546 "match": "(:)",
2547 "captures": {
2548 "0": {
2549 "name": "case-clause.expr.js punctuation.definition.section.case-statement.js"
2550 }
2551 }
2552 },
2553 {
2554 "include": "#statements"
2555 }
2556 ]
2557 }
2558 ]
2559 },
2560 "for-loop": {
2561 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))for(?=((\\s+|(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*))await)?\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)?(\\())",
2562 "beginCaptures": {
2563 "0": {
2564 "name": "keyword.control.loop.js"
2565 }
2566 },
2567 "end": "(?<=\\))",
2568 "patterns": [
2569 {
2570 "include": "#comment"
2571 },
2572 {
2573 "name": "keyword.control.loop.js",
2574 "match": "await"
2575 },
2576 {
2577 "begin": "\\(",
2578 "beginCaptures": {
2579 "0": {
2580 "name": "meta.brace.round.js"
2581 }
2582 },
2583 "end": "\\)",
2584 "endCaptures": {
2585 "0": {
2586 "name": "meta.brace.round.js"
2587 }
2588 },
2589 "patterns": [
2590 {
2591 "include": "#var-expr"
2592 },
2593 {
2594 "include": "#expression"
2595 },
2596 {
2597 "include": "#punctuation-semicolon"
2598 }
2599 ]
2600 }
2601 ]
2602 },
2603 "if-statement": {
2604 "patterns": [
2605 {
2606 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bif\\s*(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))\\s*(?!\\{))",
2607 "end": "(?=;|$|\\})",
2608 "patterns": [
2609 {
2610 "include": "#comment"
2611 },
2612 {
2613 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(if)\\s*(\\()",
2614 "beginCaptures": {
2615 "1": {
2616 "name": "keyword.control.conditional.js"
2617 },
2618 "2": {
2619 "name": "meta.brace.round.js"
2620 }
2621 },
2622 "end": "\\)",
2623 "endCaptures": {
2624 "0": {
2625 "name": "meta.brace.round.js"
2626 }
2627 },
2628 "patterns": [
2629 {
2630 "include": "#expression"
2631 }
2632 ]
2633 },
2634 {
2635 "name": "string.regexp.js",
2636 "begin": "(?<=\\))\\s*\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
2637 "beginCaptures": {
2638 "0": {
2639 "name": "punctuation.definition.string.begin.js"
2640 }
2641 },
2642 "end": "(/)([dgimsuy]*)",
2643 "endCaptures": {
2644 "1": {
2645 "name": "punctuation.definition.string.end.js"
2646 },
2647 "2": {
2648 "name": "keyword.other.js"
2649 }
2650 },
2651 "patterns": [
2652 {
2653 "include": "#regexp"
2654 }
2655 ]
2656 },
2657 {
2658 "include": "#statements"
2659 }
2660 ]
2661 }
2662 ]
2663 },
2664 "decl-block": {
2665 "name": "meta.block.js",
2666 "begin": "\\{",
2667 "beginCaptures": {
2668 "0": {
2669 "name": "punctuation.definition.block.js"
2670 }
2671 },
2672 "end": "\\}",
2673 "endCaptures": {
2674 "0": {
2675 "name": "punctuation.definition.block.js"
2676 }
2677 },
2678 "patterns": [
2679 {
2680 "include": "#statements"
2681 }
2682 ]
2683 },
2684 "after-operator-block-as-object-literal": {
2685 "name": "meta.objectliteral.js",
2686 "begin": "(?<!\\+\\+|--)(?<=[:=(,\\[?+!>]|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^yield|[^\\._$[:alnum:]]yield|^throw|[^\\._$[:alnum:]]throw|^in|[^\\._$[:alnum:]]in|^of|[^\\._$[:alnum:]]of|^typeof|[^\\._$[:alnum:]]typeof|&&|\\|\\||\\*)\\s*(\\{)",
2687 "beginCaptures": {
2688 "1": {
2689 "name": "punctuation.definition.block.js"
2690 }
2691 },
2692 "end": "\\}",
2693 "endCaptures": {
2694 "0": {
2695 "name": "punctuation.definition.block.js"
2696 }
2697 },
2698 "patterns": [
2699 {
2700 "include": "#object-member"
2701 }
2702 ]
2703 },
2704 "object-literal": {
2705 "name": "meta.objectliteral.js",
2706 "begin": "\\{",
2707 "beginCaptures": {
2708 "0": {
2709 "name": "punctuation.definition.block.js"
2710 }
2711 },
2712 "end": "\\}",
2713 "endCaptures": {
2714 "0": {
2715 "name": "punctuation.definition.block.js"
2716 }
2717 },
2718 "patterns": [
2719 {
2720 "include": "#object-member"
2721 }
2722 ]
2723 },
2724 "object-member": {
2725 "patterns": [
2726 {
2727 "include": "#comment"
2728 },
2729 {
2730 "include": "#object-literal-method-declaration"
2731 },
2732 {
2733 "name": "meta.object.member.js meta.object-literal.key.js",
2734 "begin": "(?=\\[)",
2735 "end": "(?=:)|((?<=[\\]])(?=\\s*[\\(\\<]))",
2736 "patterns": [
2737 {
2738 "include": "#comment"
2739 },
2740 {
2741 "include": "#array-literal"
2742 }
2743 ]
2744 },
2745 {
2746 "name": "meta.object.member.js meta.object-literal.key.js",
2747 "begin": "(?=[\\'\\\"\\`])",
2748 "end": "(?=:)|((?<=[\\'\\\"\\`])(?=((\\s*[\\(\\<,}])|(\\s+(as|satisifies)\\s+))))",
2749 "patterns": [
2750 {
2751 "include": "#comment"
2752 },
2753 {
2754 "include": "#string"
2755 }
2756 ]
2757 },
2758 {
2759 "name": "meta.object.member.js meta.object-literal.key.js",
2760 "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)(?!\\$)))",
2761 "end": "(?=:)|(?=\\s*([\\(\\<,}])|(\\s+as|satisifies\\s+))",
2762 "patterns": [
2763 {
2764 "include": "#comment"
2765 },
2766 {
2767 "include": "#numeric-literal"
2768 }
2769 ]
2770 },
2771 {
2772 "name": "meta.method.declaration.js",
2773 "begin": "(?<=[\\]\\'\\\"\\`])(?=\\s*[\\(\\<])",
2774 "end": "(?=\\}|;|,)|(?<=\\})",
2775 "patterns": [
2776 {
2777 "include": "#function-body"
2778 }
2779 ]
2780 },
2781 {
2782 "name": "meta.object.member.js",
2783 "match": "(?![_$[:alpha:]])([[:digit:]]+)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)",
2784 "captures": {
2785 "0": {
2786 "name": "meta.object-literal.key.js"
2787 },
2788 "1": {
2789 "name": "constant.numeric.decimal.js"
2790 }
2791 }
2792 },
2793 {
2794 "name": "meta.object.member.js",
2795 "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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
2796 "captures": {
2797 "0": {
2798 "name": "meta.object-literal.key.js"
2799 },
2800 "1": {
2801 "name": "entity.name.function.js"
2802 }
2803 }
2804 },
2805 {
2806 "name": "meta.object.member.js",
2807 "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)",
2808 "captures": {
2809 "0": {
2810 "name": "meta.object-literal.key.js"
2811 }
2812 }
2813 },
2814 {
2815 "name": "meta.object.member.js",
2816 "begin": "\\.\\.\\.",
2817 "beginCaptures": {
2818 "0": {
2819 "name": "keyword.operator.spread.js"
2820 }
2821 },
2822 "end": "(?=,|\\})",
2823 "patterns": [
2824 {
2825 "include": "#expression"
2826 }
2827 ]
2828 },
2829 {
2830 "name": "meta.object.member.js",
2831 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$|\\/\\/|\\/\\*)",
2832 "captures": {
2833 "1": {
2834 "name": "variable.other.readwrite.js"
2835 }
2836 }
2837 },
2838 {
2839 "name": "meta.object.member.js",
2840 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*([,}]|$))",
2841 "captures": {
2842 "1": {
2843 "name": "keyword.control.as.js"
2844 },
2845 "2": {
2846 "name": "storage.modifier.js"
2847 }
2848 }
2849 },
2850 {
2851 "name": "meta.object.member.js",
2852 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(as)|(satisfies))\\s+",
2853 "beginCaptures": {
2854 "1": {
2855 "name": "keyword.control.as.js"
2856 },
2857 "2": {
2858 "name": "keyword.control.satisfies.js"
2859 }
2860 },
2861 "end": "(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|^|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as|satisifies)\\s+))",
2862 "patterns": [
2863 {
2864 "include": "#type"
2865 }
2866 ]
2867 },
2868 {
2869 "name": "meta.object.member.js",
2870 "begin": "(?=[_$[:alpha:]][_$[:alnum:]]*\\s*=)",
2871 "end": "(?=,|\\}|$|\\/\\/|\\/\\*)",
2872 "patterns": [
2873 {
2874 "include": "#expression"
2875 }
2876 ]
2877 },
2878 {
2879 "name": "meta.object.member.js",
2880 "begin": ":",
2881 "beginCaptures": {
2882 "0": {
2883 "name": "meta.object-literal.key.js punctuation.separator.key-value.js"
2884 }
2885 },
2886 "end": "(?=,|\\})",
2887 "patterns": [
2888 {
2889 "begin": "(?<=:)\\s*(async)?(?=\\s*(<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2890 "beginCaptures": {
2891 "1": {
2892 "name": "storage.modifier.async.js"
2893 }
2894 },
2895 "end": "(?<=\\))",
2896 "patterns": [
2897 {
2898 "include": "#type-parameters"
2899 },
2900 {
2901 "begin": "\\(",
2902 "beginCaptures": {
2903 "0": {
2904 "name": "meta.brace.round.js"
2905 }
2906 },
2907 "end": "\\)",
2908 "endCaptures": {
2909 "0": {
2910 "name": "meta.brace.round.js"
2911 }
2912 },
2913 "patterns": [
2914 {
2915 "include": "#expression-inside-possibly-arrow-parens"
2916 }
2917 ]
2918 }
2919 ]
2920 },
2921 {
2922 "begin": "(?<=:)\\s*(async)?\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2923 "beginCaptures": {
2924 "1": {
2925 "name": "storage.modifier.async.js"
2926 },
2927 "2": {
2928 "name": "meta.brace.round.js"
2929 }
2930 },
2931 "end": "\\)",
2932 "endCaptures": {
2933 "0": {
2934 "name": "meta.brace.round.js"
2935 }
2936 },
2937 "patterns": [
2938 {
2939 "include": "#expression-inside-possibly-arrow-parens"
2940 }
2941 ]
2942 },
2943 {
2944 "begin": "(?<=:)\\s*(async)?\\s*(?=\\<\\s*$)",
2945 "beginCaptures": {
2946 "1": {
2947 "name": "storage.modifier.async.js"
2948 }
2949 },
2950 "end": "(?<=\\>)",
2951 "patterns": [
2952 {
2953 "include": "#type-parameters"
2954 }
2955 ]
2956 },
2957 {
2958 "begin": "(?<=\\>)\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2959 "beginCaptures": {
2960 "1": {
2961 "name": "meta.brace.round.js"
2962 }
2963 },
2964 "end": "\\)",
2965 "endCaptures": {
2966 "0": {
2967 "name": "meta.brace.round.js"
2968 }
2969 },
2970 "patterns": [
2971 {
2972 "include": "#expression-inside-possibly-arrow-parens"
2973 }
2974 ]
2975 },
2976 {
2977 "include": "#possibly-arrow-return-type"
2978 },
2979 {
2980 "include": "#expression"
2981 }
2982 ]
2983 },
2984 {
2985 "include": "#punctuation-comma"
2986 },
2987 {
2988 "include": "#decl-block"
2989 }
2990 ]
2991 },
2992 "ternary-expression": {
2993 "begin": "(?!\\?\\.\\s*[^[:digit:]])(\\?)(?!\\?)",
2994 "beginCaptures": {
2995 "1": {
2996 "name": "keyword.operator.ternary.js"
2997 }
2998 },
2999 "end": "\\s*(:)",
3000 "endCaptures": {
3001 "1": {
3002 "name": "keyword.operator.ternary.js"
3003 }
3004 },
3005 "patterns": [
3006 {
3007 "include": "#expression"
3008 }
3009 ]
3010 },
3011 "function-call": {
3012 "patterns": [
3013 {
3014 "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*)?\\())",
3015 "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*)?\\())",
3016 "patterns": [
3017 {
3018 "name": "meta.function-call.js",
3019 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))",
3020 "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*)?\\())",
3021 "patterns": [
3022 {
3023 "include": "#function-call-target"
3024 }
3025 ]
3026 },
3027 {
3028 "include": "#comment"
3029 },
3030 {
3031 "include": "#function-call-optionals"
3032 },
3033 {
3034 "include": "#type-arguments"
3035 },
3036 {
3037 "include": "#paren-expression"
3038 }
3039 ]
3040 },
3041 {
3042 "begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))",
3043 "end": "(?<=\\>)(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))",
3044 "patterns": [
3045 {
3046 "name": "meta.function-call.js",
3047 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))",
3048 "end": "(?=(<\\s*[\\{\\[\\(]\\s*$))",
3049 "patterns": [
3050 {
3051 "include": "#function-call-target"
3052 }
3053 ]
3054 },
3055 {
3056 "include": "#comment"
3057 },
3058 {
3059 "include": "#function-call-optionals"
3060 },
3061 {
3062 "include": "#type-arguments"
3063 }
3064 ]
3065 }
3066 ]
3067 },
3068 "function-call-target": {
3069 "patterns": [
3070 {
3071 "include": "#support-function-call-identifiers"
3072 },
3073 {
3074 "name": "entity.name.function.js",
3075 "match": "(\\#?[_$[:alpha:]][_$[:alnum:]]*)"
3076 }
3077 ]
3078 },
3079 "function-call-optionals": {
3080 "patterns": [
3081 {
3082 "name": "meta.function-call.js punctuation.accessor.optional.js",
3083 "match": "\\?\\."
3084 },
3085 {
3086 "name": "meta.function-call.js keyword.operator.definiteassignment.js",
3087 "match": "\\!"
3088 }
3089 ]
3090 },
3091 "support-function-call-identifiers": {
3092 "patterns": [
3093 {
3094 "include": "#literal"
3095 },
3096 {
3097 "include": "#support-objects"
3098 },
3099 {
3100 "include": "#object-identifiers"
3101 },
3102 {
3103 "include": "#punctuation-accessor"
3104 },
3105 {
3106 "name": "keyword.operator.expression.import.js",
3107 "match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*[\\(]\\s*[\\\"\\'\\`]))"
3108 }
3109 ]
3110 },
3111 "new-expr": {
3112 "name": "new.expr.js",
3113 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3114 "beginCaptures": {
3115 "1": {
3116 "name": "keyword.operator.new.js"
3117 }
3118 },
3119 "end": "(?<=\\))|(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
3120 "patterns": [
3121 {
3122 "include": "#expression"
3123 }
3124 ]
3125 },
3126 "instanceof-expr": {
3127 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(instanceof)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3128 "beginCaptures": {
3129 "1": {
3130 "name": "keyword.operator.expression.instanceof.js"
3131 }
3132 },
3133 "end": "(?<=\\))|(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|(===|!==|==|!=)|(([\\&\\~\\^\\|]\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s+instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
3134 "patterns": [
3135 {
3136 "include": "#type"
3137 }
3138 ]
3139 },
3140 "paren-expression-possibly-arrow": {
3141 "patterns": [
3142 {
3143 "begin": "(?<=[(=,])\\s*(async)?(?=\\s*((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
3144 "beginCaptures": {
3145 "1": {
3146 "name": "storage.modifier.async.js"
3147 }
3148 },
3149 "end": "(?<=\\))",
3150 "patterns": [
3151 {
3152 "include": "#paren-expression-possibly-arrow-with-typeparameters"
3153 }
3154 ]
3155 },
3156 {
3157 "begin": "(?<=[(=,]|=>|^return|[^\\._$[:alnum:]]return)\\s*(async)?(?=\\s*((((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\()|(<)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)))\\s*$)",
3158 "beginCaptures": {
3159 "1": {
3160 "name": "storage.modifier.async.js"
3161 }
3162 },
3163 "end": "(?<=\\))",
3164 "patterns": [
3165 {
3166 "include": "#paren-expression-possibly-arrow-with-typeparameters"
3167 }
3168 ]
3169 },
3170 {
3171 "include": "#possibly-arrow-return-type"
3172 }
3173 ]
3174 },
3175 "paren-expression-possibly-arrow-with-typeparameters": {
3176 "patterns": [
3177 {
3178 "include": "#type-parameters"
3179 },
3180 {
3181 "begin": "\\(",
3182 "beginCaptures": {
3183 "0": {
3184 "name": "meta.brace.round.js"
3185 }
3186 },
3187 "end": "\\)",
3188 "endCaptures": {
3189 "0": {
3190 "name": "meta.brace.round.js"
3191 }
3192 },
3193 "patterns": [
3194 {
3195 "include": "#expression-inside-possibly-arrow-parens"
3196 }
3197 ]
3198 }
3199 ]
3200 },
3201 "expression-inside-possibly-arrow-parens": {
3202 "patterns": [
3203 {
3204 "include": "#expressionWithoutIdentifiers"
3205 },
3206 {
3207 "include": "#comment"
3208 },
3209 {
3210 "include": "#string"
3211 },
3212 {
3213 "include": "#decorator"
3214 },
3215 {
3216 "include": "#destructuring-parameter"
3217 },
3218 {
3219 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)",
3220 "captures": {
3221 "1": {
3222 "name": "storage.modifier.js"
3223 }
3224 }
3225 },
3226 {
3227 "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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
3228 "captures": {
3229 "1": {
3230 "name": "storage.modifier.js"
3231 },
3232 "2": {
3233 "name": "keyword.operator.rest.js"
3234 },
3235 "3": {
3236 "name": "entity.name.function.js variable.language.this.js"
3237 },
3238 "4": {
3239 "name": "entity.name.function.js"
3240 },
3241 "5": {
3242 "name": "keyword.operator.optional.js"
3243 }
3244 }
3245 },
3246 {
3247 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*[:,]|$)",
3248 "captures": {
3249 "1": {
3250 "name": "storage.modifier.js"
3251 },
3252 "2": {
3253 "name": "keyword.operator.rest.js"
3254 },
3255 "3": {
3256 "name": "variable.parameter.js variable.language.this.js"
3257 },
3258 "4": {
3259 "name": "variable.parameter.js"
3260 },
3261 "5": {
3262 "name": "keyword.operator.optional.js"
3263 }
3264 }
3265 },
3266 {
3267 "include": "#type-annotation"
3268 },
3269 {
3270 "include": "#variable-initializer"
3271 },
3272 {
3273 "name": "punctuation.separator.parameter.js",
3274 "match": ","
3275 },
3276 {
3277 "include": "#identifiers"
3278 },
3279 {
3280 "include": "#expressionPunctuations"
3281 }
3282 ]
3283 },
3284 "paren-expression": {
3285 "begin": "\\(",
3286 "beginCaptures": {
3287 "0": {
3288 "name": "meta.brace.round.js"
3289 }
3290 },
3291 "end": "\\)",
3292 "endCaptures": {
3293 "0": {
3294 "name": "meta.brace.round.js"
3295 }
3296 },
3297 "patterns": [
3298 {
3299 "include": "#expression"
3300 }
3301 ]
3302 },
3303 "cast": {
3304 "patterns": [
3305 {
3306 "include": "#jsx"
3307 }
3308 ]
3309 },
3310 "expression-operators": {
3311 "patterns": [
3312 {
3313 "name": "keyword.control.flow.js",
3314 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(await)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3315 },
3316 {
3317 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?=\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*\\*)",
3318 "beginCaptures": {
3319 "1": {
3320 "name": "keyword.control.flow.js"
3321 }
3322 },
3323 "end": "\\*",
3324 "endCaptures": {
3325 "0": {
3326 "name": "keyword.generator.asterisk.js"
3327 }
3328 },
3329 "patterns": [
3330 {
3331 "include": "#comment"
3332 }
3333 ]
3334 },
3335 {
3336 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s*(\\*))?",
3337 "captures": {
3338 "1": {
3339 "name": "keyword.control.flow.js"
3340 },
3341 "2": {
3342 "name": "keyword.generator.asterisk.js"
3343 }
3344 }
3345 },
3346 {
3347 "name": "keyword.operator.expression.delete.js",
3348 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))delete(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3349 },
3350 {
3351 "name": "keyword.operator.expression.in.js",
3352 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))in(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()"
3353 },
3354 {
3355 "name": "keyword.operator.expression.of.js",
3356 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))of(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()"
3357 },
3358 {
3359 "name": "keyword.operator.expression.instanceof.js",
3360 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3361 },
3362 {
3363 "name": "keyword.operator.new.js",
3364 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3365 },
3366 {
3367 "include": "#typeof-operator"
3368 },
3369 {
3370 "name": "keyword.operator.expression.void.js",
3371 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))void(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3372 },
3373 {
3374 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*($|[;,:})\\]]))",
3375 "captures": {
3376 "1": {
3377 "name": "keyword.control.as.js"
3378 },
3379 "2": {
3380 "name": "storage.modifier.js"
3381 }
3382 }
3383 },
3384 {
3385 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(as)|(satisfies))\\s+",
3386 "beginCaptures": {
3387 "1": {
3388 "name": "keyword.control.as.js"
3389 },
3390 "2": {
3391 "name": "keyword.control.satisfies.js"
3392 }
3393 },
3394 "end": "(?=^|[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as|satisfies)\\s+)|(\\s+\\<))",
3395 "patterns": [
3396 {
3397 "include": "#type"
3398 }
3399 ]
3400 },
3401 {
3402 "name": "keyword.operator.spread.js",
3403 "match": "\\.\\.\\."
3404 },
3405 {
3406 "name": "keyword.operator.assignment.compound.js",
3407 "match": "\\*=|(?<!\\()/=|%=|\\+=|\\-="
3408 },
3409 {
3410 "name": "keyword.operator.assignment.compound.bitwise.js",
3411 "match": "\\&=|\\^=|<<=|>>=|>>>=|\\|="
3412 },
3413 {
3414 "name": "keyword.operator.bitwise.shift.js",
3415 "match": "<<|>>>|>>"
3416 },
3417 {
3418 "name": "keyword.operator.comparison.js",
3419 "match": "===|!==|==|!="
3420 },
3421 {
3422 "name": "keyword.operator.relational.js",
3423 "match": "<=|>=|<>|<|>"
3424 },
3425 {
3426 "match": "(?<=[_$[:alnum:]])(\\!)\\s*(?:(/=)|(?:(/)(?![/*])))",
3427 "captures": {
3428 "1": {
3429 "name": "keyword.operator.logical.js"
3430 },
3431 "2": {
3432 "name": "keyword.operator.assignment.compound.js"
3433 },
3434 "3": {
3435 "name": "keyword.operator.arithmetic.js"
3436 }
3437 }
3438 },
3439 {
3440 "name": "keyword.operator.logical.js",
3441 "match": "\\!|&&|\\|\\||\\?\\?"
3442 },
3443 {
3444 "name": "keyword.operator.bitwise.js",
3445 "match": "\\&|~|\\^|\\|"
3446 },
3447 {
3448 "name": "keyword.operator.assignment.js",
3449 "match": "\\="
3450 },
3451 {
3452 "name": "keyword.operator.decrement.js",
3453 "match": "--"
3454 },
3455 {
3456 "name": "keyword.operator.increment.js",
3457 "match": "\\+\\+"
3458 },
3459 {
3460 "name": "keyword.operator.arithmetic.js",
3461 "match": "%|\\*|/|-|\\+"
3462 },
3463 {
3464 "begin": "(?<=[_$[:alnum:])\\]])\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)+(?:(/=)|(?:(/)(?![/*]))))",
3465 "end": "(?:(/=)|(?:(/)(?!\\*([^\\*]|(\\*[^\\/]))*\\*\\/)))",
3466 "endCaptures": {
3467 "1": {
3468 "name": "keyword.operator.assignment.compound.js"
3469 },
3470 "2": {
3471 "name": "keyword.operator.arithmetic.js"
3472 }
3473 },
3474 "patterns": [
3475 {
3476 "include": "#comment"
3477 }
3478 ]
3479 },
3480 {
3481 "match": "(?<=[_$[:alnum:])\\]])\\s*(?:(/=)|(?:(/)(?![/*])))",
3482 "captures": {
3483 "1": {
3484 "name": "keyword.operator.assignment.compound.js"
3485 },
3486 "2": {
3487 "name": "keyword.operator.arithmetic.js"
3488 }
3489 }
3490 }
3491 ]
3492 },
3493 "typeof-operator": {
3494 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))typeof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3495 "beginCaptures": {
3496 "0": {
3497 "name": "keyword.operator.expression.typeof.js"
3498 }
3499 },
3500 "end": "(?=[,);}\\]=>:&|{\\?]|(extends\\s+)|$|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))",
3501 "patterns": [
3502 {
3503 "include": "#type-arguments"
3504 },
3505 {
3506 "include": "#expression"
3507 }
3508 ]
3509 },
3510 "literal": {
3511 "patterns": [
3512 {
3513 "include": "#numeric-literal"
3514 },
3515 {
3516 "include": "#boolean-literal"
3517 },
3518 {
3519 "include": "#null-literal"
3520 },
3521 {
3522 "include": "#undefined-literal"
3523 },
3524 {
3525 "include": "#numericConstant-literal"
3526 },
3527 {
3528 "include": "#array-literal"
3529 },
3530 {
3531 "include": "#this-literal"
3532 },
3533 {
3534 "include": "#super-literal"
3535 }
3536 ]
3537 },
3538 "array-literal": {
3539 "name": "meta.array.literal.js",
3540 "begin": "\\s*(\\[)",
3541 "beginCaptures": {
3542 "1": {
3543 "name": "meta.brace.square.js"
3544 }
3545 },
3546 "end": "\\]",
3547 "endCaptures": {
3548 "0": {
3549 "name": "meta.brace.square.js"
3550 }
3551 },
3552 "patterns": [
3553 {
3554 "include": "#expression"
3555 },
3556 {
3557 "include": "#punctuation-comma"
3558 }
3559 ]
3560 },
3561 "numeric-literal": {
3562 "patterns": [
3563 {
3564 "name": "constant.numeric.hex.js",
3565 "match": "\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$)",
3566 "captures": {
3567 "1": {
3568 "name": "storage.type.numeric.bigint.js"
3569 }
3570 }
3571 },
3572 {
3573 "name": "constant.numeric.binary.js",
3574 "match": "\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$)",
3575 "captures": {
3576 "1": {
3577 "name": "storage.type.numeric.bigint.js"
3578 }
3579 }
3580 },
3581 {
3582 "name": "constant.numeric.octal.js",
3583 "match": "\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$)",
3584 "captures": {
3585 "1": {
3586 "name": "storage.type.numeric.bigint.js"
3587 }
3588 }
3589 },
3590 {
3591 "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)(?!\\$)",
3592 "captures": {
3593 "0": {
3594 "name": "constant.numeric.decimal.js"
3595 },
3596 "1": {
3597 "name": "meta.delimiter.decimal.period.js"
3598 },
3599 "2": {
3600 "name": "storage.type.numeric.bigint.js"
3601 },
3602 "3": {
3603 "name": "meta.delimiter.decimal.period.js"
3604 },
3605 "4": {
3606 "name": "storage.type.numeric.bigint.js"
3607 },
3608 "5": {
3609 "name": "meta.delimiter.decimal.period.js"
3610 },
3611 "6": {
3612 "name": "storage.type.numeric.bigint.js"
3613 },
3614 "7": {
3615 "name": "storage.type.numeric.bigint.js"
3616 },
3617 "8": {
3618 "name": "meta.delimiter.decimal.period.js"
3619 },
3620 "9": {
3621 "name": "storage.type.numeric.bigint.js"
3622 },
3623 "10": {
3624 "name": "meta.delimiter.decimal.period.js"
3625 },
3626 "11": {
3627 "name": "storage.type.numeric.bigint.js"
3628 },
3629 "12": {
3630 "name": "meta.delimiter.decimal.period.js"
3631 },
3632 "13": {
3633 "name": "storage.type.numeric.bigint.js"
3634 },
3635 "14": {
3636 "name": "storage.type.numeric.bigint.js"
3637 }
3638 }
3639 }
3640 ]
3641 },
3642 "boolean-literal": {
3643 "patterns": [
3644 {
3645 "name": "constant.language.boolean.true.js",
3646 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))true(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3647 },
3648 {
3649 "name": "constant.language.boolean.false.js",
3650 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))false(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3651 }
3652 ]
3653 },
3654 "null-literal": {
3655 "name": "constant.language.null.js",
3656 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))null(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3657 },
3658 "this-literal": {
3659 "name": "variable.language.this.js",
3660 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))this\\b(?!\\$)"
3661 },
3662 "super-literal": {
3663 "name": "variable.language.super.js",
3664 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))super\\b(?!\\$)"
3665 },
3666 "undefined-literal": {
3667 "name": "constant.language.undefined.js",
3668 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))undefined(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3669 },
3670 "numericConstant-literal": {
3671 "patterns": [
3672 {
3673 "name": "constant.language.nan.js",
3674 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))NaN(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3675 },
3676 {
3677 "name": "constant.language.infinity.js",
3678 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Infinity(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3679 }
3680 ]
3681 },
3682 "support-objects": {
3683 "patterns": [
3684 {
3685 "name": "variable.language.arguments.js",
3686 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(arguments)\\b(?!\\$)"
3687 },
3688 {
3689 "name": "support.class.promise.js",
3690 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Promise)\\b(?!\\$)"
3691 },
3692 {
3693 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(import)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(meta)\\b(?!\\$)",
3694 "captures": {
3695 "1": {
3696 "name": "keyword.control.import.js"
3697 },
3698 "2": {
3699 "name": "punctuation.accessor.js"
3700 },
3701 "3": {
3702 "name": "punctuation.accessor.optional.js"
3703 },
3704 "4": {
3705 "name": "support.variable.property.importmeta.js"
3706 }
3707 }
3708 },
3709 {
3710 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(target)\\b(?!\\$)",
3711 "captures": {
3712 "1": {
3713 "name": "keyword.operator.new.js"
3714 },
3715 "2": {
3716 "name": "punctuation.accessor.js"
3717 },
3718 "3": {
3719 "name": "punctuation.accessor.optional.js"
3720 },
3721 "4": {
3722 "name": "support.variable.property.target.js"
3723 }
3724 }
3725 },
3726 {
3727 "match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s* (?:\n (?:(constructor|length|prototype|__proto__)\\b(?!\\$|\\s*(<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\\())\n |\n (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\b(?!\\$)))",
3728 "captures": {
3729 "1": {
3730 "name": "punctuation.accessor.js"
3731 },
3732 "2": {
3733 "name": "punctuation.accessor.optional.js"
3734 },
3735 "3": {
3736 "name": "support.variable.property.js"
3737 },
3738 "4": {
3739 "name": "support.constant.js"
3740 }
3741 }
3742 },
3743 {
3744 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(exports)|(module)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)",
3745 "captures": {
3746 "1": {
3747 "name": "support.type.object.module.js"
3748 },
3749 "2": {
3750 "name": "support.type.object.module.js"
3751 },
3752 "3": {
3753 "name": "punctuation.accessor.js"
3754 },
3755 "4": {
3756 "name": "punctuation.accessor.optional.js"
3757 },
3758 "5": {
3759 "name": "support.type.object.module.js"
3760 }
3761 }
3762 }
3763 ]
3764 },
3765 "identifiers": {
3766 "patterns": [
3767 {
3768 "include": "#object-identifiers"
3769 },
3770 {
3771 "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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\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*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))",
3772 "captures": {
3773 "1": {
3774 "name": "punctuation.accessor.js"
3775 },
3776 "2": {
3777 "name": "punctuation.accessor.optional.js"
3778 },
3779 "3": {
3780 "name": "entity.name.function.js"
3781 }
3782 }
3783 },
3784 {
3785 "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
3786 "captures": {
3787 "1": {
3788 "name": "punctuation.accessor.js"
3789 },
3790 "2": {
3791 "name": "punctuation.accessor.optional.js"
3792 },
3793 "3": {
3794 "name": "variable.other.constant.property.js"
3795 }
3796 }
3797 },
3798 {
3799 "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*)",
3800 "captures": {
3801 "1": {
3802 "name": "punctuation.accessor.js"
3803 },
3804 "2": {
3805 "name": "punctuation.accessor.optional.js"
3806 },
3807 "3": {
3808 "name": "variable.other.property.js"
3809 }
3810 }
3811 },
3812 {
3813 "name": "variable.other.constant.js",
3814 "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
3815 },
3816 {
3817 "name": "variable.other.readwrite.js",
3818 "match": "[_$[:alpha:]][_$[:alnum:]]*"
3819 }
3820 ]
3821 },
3822 "object-identifiers": {
3823 "patterns": [
3824 {
3825 "name": "support.class.js",
3826 "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\??\\.\\s*prototype\\b(?!\\$))"
3827 },
3828 {
3829 "match": "(?x)(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(?:\n (\\#?[[:upper:]][_$[:digit:][:upper:]]*) |\n (\\#?[_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)",
3830 "captures": {
3831 "1": {
3832 "name": "punctuation.accessor.js"
3833 },
3834 "2": {
3835 "name": "punctuation.accessor.optional.js"
3836 },
3837 "3": {
3838 "name": "variable.other.constant.object.property.js"
3839 },
3840 "4": {
3841 "name": "variable.other.object.property.js"
3842 }
3843 }
3844 },
3845 {
3846 "match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)",
3847 "captures": {
3848 "1": {
3849 "name": "variable.other.constant.object.js"
3850 },
3851 "2": {
3852 "name": "variable.other.object.js"
3853 }
3854 }
3855 }
3856 ]
3857 },
3858 "type-annotation": {
3859 "patterns": [
3860 {
3861 "name": "meta.type.annotation.js",
3862 "begin": "(:)(?=\\s*\\S)",
3863 "beginCaptures": {
3864 "1": {
3865 "name": "keyword.operator.type.annotation.js"
3866 }
3867 },
3868 "end": "(?<![:|&])(?!\\s*[|&]\\s+)((?=^|[,);\\}\\]]|//)|(?==[^>])|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))",
3869 "patterns": [
3870 {
3871 "include": "#type"
3872 }
3873 ]
3874 },
3875 {
3876 "name": "meta.type.annotation.js",
3877 "begin": "(:)",
3878 "beginCaptures": {
3879 "1": {
3880 "name": "keyword.operator.type.annotation.js"
3881 }
3882 },
3883 "end": "(?<![:|&])((?=[,);\\}\\]]|\\/\\/)|(?==[^>])|(?=^\\s*$)|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))",
3884 "patterns": [
3885 {
3886 "include": "#type"
3887 }
3888 ]
3889 }
3890 ]
3891 },
3892 "parameter-type-annotation": {
3893 "patterns": [
3894 {
3895 "name": "meta.type.annotation.js",
3896 "begin": "(:)",
3897 "beginCaptures": {
3898 "1": {
3899 "name": "keyword.operator.type.annotation.js"
3900 }
3901 },
3902 "end": "(?=[,)])|(?==[^>])",
3903 "patterns": [
3904 {
3905 "include": "#type"
3906 }
3907 ]
3908 }
3909 ]
3910 },
3911 "return-type": {
3912 "patterns": [
3913 {
3914 "name": "meta.return.type.js",
3915 "begin": "(?<=\\))\\s*(:)(?=\\s*\\S)",
3916 "beginCaptures": {
3917 "1": {
3918 "name": "keyword.operator.type.annotation.js"
3919 }
3920 },
3921 "end": "(?<![:|&])(?=$|^|[{};,]|//)",
3922 "patterns": [
3923 {
3924 "include": "#return-type-core"
3925 }
3926 ]
3927 },
3928 {
3929 "name": "meta.return.type.js",
3930 "begin": "(?<=\\))\\s*(:)",
3931 "beginCaptures": {
3932 "1": {
3933 "name": "keyword.operator.type.annotation.js"
3934 }
3935 },
3936 "end": "(?<![:|&])((?=[{};,]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
3937 "patterns": [
3938 {
3939 "include": "#return-type-core"
3940 }
3941 ]
3942 }
3943 ]
3944 },
3945 "return-type-core": {
3946 "patterns": [
3947 {
3948 "include": "#comment"
3949 },
3950 {
3951 "begin": "(?<=[:|&])(?=\\s*\\{)",
3952 "end": "(?<=\\})",
3953 "patterns": [
3954 {
3955 "include": "#type-object"
3956 }
3957 ]
3958 },
3959 {
3960 "include": "#type-predicate-operator"
3961 },
3962 {
3963 "include": "#type"
3964 }
3965 ]
3966 },
3967 "arrow-return-type": {
3968 "name": "meta.return.type.arrow.js",
3969 "begin": "(?<=\\))\\s*(:)",
3970 "beginCaptures": {
3971 "1": {
3972 "name": "keyword.operator.type.annotation.js"
3973 }
3974 },
3975 "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
3976 "patterns": [
3977 {
3978 "include": "#arrow-return-type-body"
3979 }
3980 ]
3981 },
3982 "possibly-arrow-return-type": {
3983 "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*=>)",
3984 "beginCaptures": {
3985 "1": {
3986 "name": "meta.arrow.js meta.return.type.arrow.js keyword.operator.type.annotation.js"
3987 }
3988 },
3989 "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
3990 "contentName": "meta.arrow.js meta.return.type.arrow.js",
3991 "patterns": [
3992 {
3993 "include": "#arrow-return-type-body"
3994 }
3995 ]
3996 },
3997 "arrow-return-type-body": {
3998 "patterns": [
3999 {
4000 "begin": "(?<=[:])(?=\\s*\\{)",
4001 "end": "(?<=\\})",
4002 "patterns": [
4003 {
4004 "include": "#type-object"
4005 }
4006 ]
4007 },
4008 {
4009 "include": "#type-predicate-operator"
4010 },
4011 {
4012 "include": "#type"
4013 }
4014 ]
4015 },
4016 "type-parameters": {
4017 "name": "meta.type.parameters.js",
4018 "begin": "(<)",
4019 "beginCaptures": {
4020 "1": {
4021 "name": "punctuation.definition.typeparameters.begin.js"
4022 }
4023 },
4024 "end": "(>)",
4025 "endCaptures": {
4026 "1": {
4027 "name": "punctuation.definition.typeparameters.end.js"
4028 }
4029 },
4030 "patterns": [
4031 {
4032 "include": "#comment"
4033 },
4034 {
4035 "name": "storage.modifier.js",
4036 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out|const)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4037 },
4038 {
4039 "include": "#type"
4040 },
4041 {
4042 "include": "#punctuation-comma"
4043 },
4044 {
4045 "name": "keyword.operator.assignment.js",
4046 "match": "(=)(?!>)"
4047 }
4048 ]
4049 },
4050 "type-arguments": {
4051 "name": "meta.type.parameters.js",
4052 "begin": "\\<",
4053 "beginCaptures": {
4054 "0": {
4055 "name": "punctuation.definition.typeparameters.begin.js"
4056 }
4057 },
4058 "end": "\\>",
4059 "endCaptures": {
4060 "0": {
4061 "name": "punctuation.definition.typeparameters.end.js"
4062 }
4063 },
4064 "patterns": [
4065 {
4066 "include": "#type-arguments-body"
4067 }
4068 ]
4069 },
4070 "type-arguments-body": {
4071 "patterns": [
4072 {
4073 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(_)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4074 "captures": {
4075 "0": {
4076 "name": "keyword.operator.type.js"
4077 }
4078 }
4079 },
4080 {
4081 "include": "#type"
4082 },
4083 {
4084 "include": "#punctuation-comma"
4085 }
4086 ]
4087 },
4088 "type": {
4089 "patterns": [
4090 {
4091 "include": "#comment"
4092 },
4093 {
4094 "include": "#type-string"
4095 },
4096 {
4097 "include": "#numeric-literal"
4098 },
4099 {
4100 "include": "#type-primitive"
4101 },
4102 {
4103 "include": "#type-builtin-literals"
4104 },
4105 {
4106 "include": "#type-parameters"
4107 },
4108 {
4109 "include": "#type-tuple"
4110 },
4111 {
4112 "include": "#type-object"
4113 },
4114 {
4115 "include": "#type-operators"
4116 },
4117 {
4118 "include": "#type-conditional"
4119 },
4120 {
4121 "include": "#type-fn-type-parameters"
4122 },
4123 {
4124 "include": "#type-paren-or-function-parameters"
4125 },
4126 {
4127 "include": "#type-function-return-type"
4128 },
4129 {
4130 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
4131 "captures": {
4132 "1": {
4133 "name": "storage.modifier.js"
4134 }
4135 }
4136 },
4137 {
4138 "include": "#type-name"
4139 }
4140 ]
4141 },
4142 "type-primitive": {
4143 "name": "support.type.primitive.js",
4144 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(string|number|bigint|boolean|symbol|any|void|never|unknown)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4145 },
4146 "type-builtin-literals": {
4147 "name": "support.type.builtin.js",
4148 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4149 },
4150 "type-tuple": {
4151 "name": "meta.type.tuple.js",
4152 "begin": "\\[",
4153 "beginCaptures": {
4154 "0": {
4155 "name": "meta.brace.square.js"
4156 }
4157 },
4158 "end": "\\]",
4159 "endCaptures": {
4160 "0": {
4161 "name": "meta.brace.square.js"
4162 }
4163 },
4164 "patterns": [
4165 {
4166 "name": "keyword.operator.rest.js",
4167 "match": "\\.\\.\\."
4168 },
4169 {
4170 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?)?\\s*(:)",
4171 "captures": {
4172 "1": {
4173 "name": "entity.name.label.js"
4174 },
4175 "2": {
4176 "name": "keyword.operator.optional.js"
4177 },
4178 "3": {
4179 "name": "punctuation.separator.label.js"
4180 }
4181 }
4182 },
4183 {
4184 "include": "#type"
4185 },
4186 {
4187 "include": "#punctuation-comma"
4188 }
4189 ]
4190 },
4191 "type-object": {
4192 "name": "meta.object.type.js",
4193 "begin": "\\{",
4194 "beginCaptures": {
4195 "0": {
4196 "name": "punctuation.definition.block.js"
4197 }
4198 },
4199 "end": "\\}",
4200 "endCaptures": {
4201 "0": {
4202 "name": "punctuation.definition.block.js"
4203 }
4204 },
4205 "patterns": [
4206 {
4207 "include": "#comment"
4208 },
4209 {
4210 "include": "#method-declaration"
4211 },
4212 {
4213 "include": "#indexer-declaration"
4214 },
4215 {
4216 "include": "#indexer-mapped-type-declaration"
4217 },
4218 {
4219 "include": "#field-declaration"
4220 },
4221 {
4222 "include": "#type-annotation"
4223 },
4224 {
4225 "begin": "\\.\\.\\.",
4226 "beginCaptures": {
4227 "0": {
4228 "name": "keyword.operator.spread.js"
4229 }
4230 },
4231 "end": "(?=\\}|;|,|$)|(?<=\\})",
4232 "patterns": [
4233 {
4234 "include": "#type"
4235 }
4236 ]
4237 },
4238 {
4239 "include": "#punctuation-comma"
4240 },
4241 {
4242 "include": "#punctuation-semicolon"
4243 },
4244 {
4245 "include": "#type"
4246 }
4247 ]
4248 },
4249 "type-conditional": {
4250 "patterns": [
4251 {
4252 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends)\\s+",
4253 "beginCaptures": {
4254 "1": {
4255 "name": "storage.modifier.js"
4256 }
4257 },
4258 "end": "(?<=:)",
4259 "patterns": [
4260 {
4261 "begin": "\\?",
4262 "beginCaptures": {
4263 "0": {
4264 "name": "keyword.operator.ternary.js"
4265 }
4266 },
4267 "end": ":",
4268 "endCaptures": {
4269 "0": {
4270 "name": "keyword.operator.ternary.js"
4271 }
4272 },
4273 "patterns": [
4274 {
4275 "include": "#type"
4276 }
4277 ]
4278 },
4279 {
4280 "include": "#type"
4281 }
4282 ]
4283 }
4284 ]
4285 },
4286 "type-paren-or-function-parameters": {
4287 "name": "meta.type.paren.cover.js",
4288 "begin": "\\(",
4289 "beginCaptures": {
4290 "0": {
4291 "name": "meta.brace.round.js"
4292 }
4293 },
4294 "end": "\\)",
4295 "endCaptures": {
4296 "0": {
4297 "name": "meta.brace.round.js"
4298 }
4299 },
4300 "patterns": [
4301 {
4302 "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*))))))))",
4303 "captures": {
4304 "1": {
4305 "name": "storage.modifier.js"
4306 },
4307 "2": {
4308 "name": "keyword.operator.rest.js"
4309 },
4310 "3": {
4311 "name": "entity.name.function.js variable.language.this.js"
4312 },
4313 "4": {
4314 "name": "entity.name.function.js"
4315 },
4316 "5": {
4317 "name": "keyword.operator.optional.js"
4318 }
4319 }
4320 },
4321 {
4322 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=:)",
4323 "captures": {
4324 "1": {
4325 "name": "storage.modifier.js"
4326 },
4327 "2": {
4328 "name": "keyword.operator.rest.js"
4329 },
4330 "3": {
4331 "name": "variable.parameter.js variable.language.this.js"
4332 },
4333 "4": {
4334 "name": "variable.parameter.js"
4335 },
4336 "5": {
4337 "name": "keyword.operator.optional.js"
4338 }
4339 }
4340 },
4341 {
4342 "include": "#type-annotation"
4343 },
4344 {
4345 "name": "punctuation.separator.parameter.js",
4346 "match": ","
4347 },
4348 {
4349 "include": "#type"
4350 }
4351 ]
4352 },
4353 "type-fn-type-parameters": {
4354 "patterns": [
4355 {
4356 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b(?=\\s*\\<)",
4357 "beginCaptures": {
4358 "1": {
4359 "name": "meta.type.constructor.js storage.modifier.js"
4360 },
4361 "2": {
4362 "name": "meta.type.constructor.js keyword.control.new.js"
4363 }
4364 },
4365 "end": "(?<=>)",
4366 "patterns": [
4367 {
4368 "include": "#comment"
4369 },
4370 {
4371 "include": "#type-parameters"
4372 }
4373 ]
4374 },
4375 {
4376 "name": "meta.type.constructor.js",
4377 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b\\s*(?=\\()",
4378 "beginCaptures": {
4379 "1": {
4380 "name": "storage.modifier.js"
4381 },
4382 "2": {
4383 "name": "keyword.control.new.js"
4384 }
4385 },
4386 "end": "(?<=\\))",
4387 "patterns": [
4388 {
4389 "include": "#function-parameters"
4390 }
4391 ]
4392 },
4393 {
4394 "name": "meta.type.function.js",
4395 "begin": "(?x)(\n (?=\n [(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )\n )\n)",
4396 "end": "(?<=\\))",
4397 "patterns": [
4398 {
4399 "include": "#function-parameters"
4400 }
4401 ]
4402 }
4403 ]
4404 },
4405 "type-function-return-type": {
4406 "patterns": [
4407 {
4408 "name": "meta.type.function.return.js",
4409 "begin": "(=>)(?=\\s*\\S)",
4410 "beginCaptures": {
4411 "1": {
4412 "name": "storage.type.function.arrow.js"
4413 }
4414 },
4415 "end": "(?<!=>)(?<![|&])(?=[,\\]\\)\\{\\}=;>:\\?]|//|$)",
4416 "patterns": [
4417 {
4418 "include": "#type-function-return-type-core"
4419 }
4420 ]
4421 },
4422 {
4423 "name": "meta.type.function.return.js",
4424 "begin": "=>",
4425 "beginCaptures": {
4426 "0": {
4427 "name": "storage.type.function.arrow.js"
4428 }
4429 },
4430 "end": "(?<!=>)(?<![|&])((?=[,\\]\\)\\{\\}=;:\\?>]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
4431 "patterns": [
4432 {
4433 "include": "#type-function-return-type-core"
4434 }
4435 ]
4436 }
4437 ]
4438 },
4439 "type-function-return-type-core": {
4440 "patterns": [
4441 {
4442 "include": "#comment"
4443 },
4444 {
4445 "begin": "(?<==>)(?=\\s*\\{)",
4446 "end": "(?<=\\})",
4447 "patterns": [
4448 {
4449 "include": "#type-object"
4450 }
4451 ]
4452 },
4453 {
4454 "include": "#type-predicate-operator"
4455 },
4456 {
4457 "include": "#type"
4458 }
4459 ]
4460 },
4461 "type-operators": {
4462 "patterns": [
4463 {
4464 "include": "#typeof-operator"
4465 },
4466 {
4467 "include": "#type-infer"
4468 },
4469 {
4470 "begin": "([&|])(?=\\s*\\{)",
4471 "beginCaptures": {
4472 "0": {
4473 "name": "keyword.operator.type.js"
4474 }
4475 },
4476 "end": "(?<=\\})",
4477 "patterns": [
4478 {
4479 "include": "#type-object"
4480 }
4481 ]
4482 },
4483 {
4484 "begin": "[&|]",
4485 "beginCaptures": {
4486 "0": {
4487 "name": "keyword.operator.type.js"
4488 }
4489 },
4490 "end": "(?=\\S)"
4491 },
4492 {
4493 "name": "keyword.operator.expression.keyof.js",
4494 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))keyof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4495 },
4496 {
4497 "name": "keyword.operator.ternary.js",
4498 "match": "(\\?|\\:)"
4499 },
4500 {
4501 "name": "keyword.operator.expression.import.js",
4502 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*\\()"
4503 }
4504 ]
4505 },
4506 "type-infer": {
4507 "patterns": [
4508 {
4509 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(infer)\\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s+(extends)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))?",
4510 "name": "meta.type.infer.js",
4511 "captures": {
4512 "1": {
4513 "name": "keyword.operator.expression.infer.js"
4514 },
4515 "2": {
4516 "name": "entity.name.type.js"
4517 },
4518 "3": {
4519 "name": "keyword.operator.expression.extends.js"
4520 }
4521 }
4522 }
4523 ]
4524 },
4525 "type-predicate-operator": {
4526 "patterns": [
4527 {
4528 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(asserts)\\s+)?(?!asserts)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s(is)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4529 "captures": {
4530 "1": {
4531 "name": "keyword.operator.type.asserts.js"
4532 },
4533 "2": {
4534 "name": "variable.parameter.js variable.language.this.js"
4535 },
4536 "3": {
4537 "name": "variable.parameter.js"
4538 },
4539 "4": {
4540 "name": "keyword.operator.expression.is.js"
4541 }
4542 }
4543 },
4544 {
4545 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(asserts)\\s+(?!is)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4546 "captures": {
4547 "1": {
4548 "name": "keyword.operator.type.asserts.js"
4549 },
4550 "2": {
4551 "name": "variable.parameter.js variable.language.this.js"
4552 },
4553 "3": {
4554 "name": "variable.parameter.js"
4555 }
4556 }
4557 },
4558 {
4559 "name": "keyword.operator.type.asserts.js",
4560 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))asserts(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4561 },
4562 {
4563 "name": "keyword.operator.expression.is.js",
4564 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))is(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4565 }
4566 ]
4567 },
4568 "type-name": {
4569 "patterns": [
4570 {
4571 "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(<)",
4572 "captures": {
4573 "1": {
4574 "name": "entity.name.type.module.js"
4575 },
4576 "2": {
4577 "name": "punctuation.accessor.js"
4578 },
4579 "3": {
4580 "name": "punctuation.accessor.optional.js"
4581 },
4582 "4": {
4583 "name": "meta.type.parameters.js punctuation.definition.typeparameters.begin.js"
4584 }
4585 },
4586 "end": "(>)",
4587 "endCaptures": {
4588 "1": {
4589 "name": "meta.type.parameters.js punctuation.definition.typeparameters.end.js"
4590 }
4591 },
4592 "contentName": "meta.type.parameters.js",
4593 "patterns": [
4594 {
4595 "include": "#type-arguments-body"
4596 }
4597 ]
4598 },
4599 {
4600 "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(<)",
4601 "beginCaptures": {
4602 "1": {
4603 "name": "entity.name.type.js"
4604 },
4605 "2": {
4606 "name": "meta.type.parameters.js punctuation.definition.typeparameters.begin.js"
4607 }
4608 },
4609 "end": "(>)",
4610 "endCaptures": {
4611 "1": {
4612 "name": "meta.type.parameters.js punctuation.definition.typeparameters.end.js"
4613 }
4614 },
4615 "contentName": "meta.type.parameters.js",
4616 "patterns": [
4617 {
4618 "include": "#type-arguments-body"
4619 }
4620 ]
4621 },
4622 {
4623 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))",
4624 "captures": {
4625 "1": {
4626 "name": "entity.name.type.module.js"
4627 },
4628 "2": {
4629 "name": "punctuation.accessor.js"
4630 },
4631 "3": {
4632 "name": "punctuation.accessor.optional.js"
4633 }
4634 }
4635 },
4636 {
4637 "name": "entity.name.type.js",
4638 "match": "[_$[:alpha:]][_$[:alnum:]]*"
4639 }
4640 ]
4641 },
4642 "punctuation-comma": {
4643 "name": "punctuation.separator.comma.js",
4644 "match": ","
4645 },
4646 "punctuation-semicolon": {
4647 "name": "punctuation.terminator.statement.js",
4648 "match": ";"
4649 },
4650 "punctuation-accessor": {
4651 "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))",
4652 "captures": {
4653 "1": {
4654 "name": "punctuation.accessor.js"
4655 },
4656 "2": {
4657 "name": "punctuation.accessor.optional.js"
4658 }
4659 }
4660 },
4661 "string": {
4662 "patterns": [
4663 {
4664 "include": "#qstring-single"
4665 },
4666 {
4667 "include": "#qstring-double"
4668 },
4669 {
4670 "include": "#template"
4671 }
4672 ]
4673 },
4674 "qstring-double": {
4675 "name": "string.quoted.double.js",
4676 "begin": "\"",
4677 "beginCaptures": {
4678 "0": {
4679 "name": "punctuation.definition.string.begin.js"
4680 }
4681 },
4682 "end": "(\")|((?:[^\\\\\\n])$)",
4683 "endCaptures": {
4684 "1": {
4685 "name": "punctuation.definition.string.end.js"
4686 },
4687 "2": {
4688 "name": "invalid.illegal.newline.js"
4689 }
4690 },
4691 "patterns": [
4692 {
4693 "include": "#string-character-escape"
4694 }
4695 ]
4696 },
4697 "qstring-single": {
4698 "name": "string.quoted.single.js",
4699 "begin": "'",
4700 "beginCaptures": {
4701 "0": {
4702 "name": "punctuation.definition.string.begin.js"
4703 }
4704 },
4705 "end": "(\\')|((?:[^\\\\\\n])$)",
4706 "endCaptures": {
4707 "1": {
4708 "name": "punctuation.definition.string.end.js"
4709 },
4710 "2": {
4711 "name": "invalid.illegal.newline.js"
4712 }
4713 },
4714 "patterns": [
4715 {
4716 "include": "#string-character-escape"
4717 }
4718 ]
4719 },
4720 "string-character-escape": {
4721 "name": "constant.character.escape.js",
4722 "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]?|.|$)"
4723 },
4724 "template": {
4725 "patterns": [
4726 {
4727 "include": "#template-call"
4728 },
4729 {
4730 "contentName": "string.template.js",
4731 "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
4732 "beginCaptures": {
4733 "1": {
4734 "name": "entity.name.function.tagged-template.js"
4735 },
4736 "2": {
4737 "name": "string.template.js punctuation.definition.string.template.begin.js"
4738 }
4739 },
4740 "end": "`",
4741 "endCaptures": {
4742 "0": {
4743 "name": "string.template.js punctuation.definition.string.template.end.js"
4744 }
4745 },
4746 "patterns": [
4747 {
4748 "include": "#template-substitution-element"
4749 },
4750 {
4751 "include": "#string-character-escape"
4752 }
4753 ]
4754 }
4755 ]
4756 },
4757 "template-call": {
4758 "patterns": [
4759 {
4760 "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*)?`)",
4761 "end": "(?=`)",
4762 "patterns": [
4763 {
4764 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))",
4765 "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*)?`)",
4766 "patterns": [
4767 {
4768 "include": "#support-function-call-identifiers"
4769 },
4770 {
4771 "name": "entity.name.function.tagged-template.js",
4772 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
4773 }
4774 ]
4775 },
4776 {
4777 "include": "#type-arguments"
4778 }
4779 ]
4780 },
4781 {
4782 "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*)`)",
4783 "beginCaptures": {
4784 "1": {
4785 "name": "entity.name.function.tagged-template.js"
4786 }
4787 },
4788 "end": "(?=`)",
4789 "patterns": [
4790 {
4791 "include": "#type-arguments"
4792 }
4793 ]
4794 }
4795 ]
4796 },
4797 "template-substitution-element": {
4798 "name": "meta.template.expression.js",
4799 "begin": "\\$\\{",
4800 "beginCaptures": {
4801 "0": {
4802 "name": "punctuation.definition.template-expression.begin.js"
4803 }
4804 },
4805 "end": "\\}",
4806 "endCaptures": {
4807 "0": {
4808 "name": "punctuation.definition.template-expression.end.js"
4809 }
4810 },
4811 "patterns": [
4812 {
4813 "include": "#expression"
4814 }
4815 ],
4816 "contentName": "meta.embedded.line.js"
4817 },
4818 "type-string": {
4819 "patterns": [
4820 {
4821 "include": "#qstring-single"
4822 },
4823 {
4824 "include": "#qstring-double"
4825 },
4826 {
4827 "include": "#template-type"
4828 }
4829 ]
4830 },
4831 "template-type": {
4832 "patterns": [
4833 {
4834 "include": "#template-call"
4835 },
4836 {
4837 "contentName": "string.template.js",
4838 "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
4839 "beginCaptures": {
4840 "1": {
4841 "name": "entity.name.function.tagged-template.js"
4842 },
4843 "2": {
4844 "name": "string.template.js punctuation.definition.string.template.begin.js"
4845 }
4846 },
4847 "end": "`",
4848 "endCaptures": {
4849 "0": {
4850 "name": "string.template.js punctuation.definition.string.template.end.js"
4851 }
4852 },
4853 "patterns": [
4854 {
4855 "include": "#template-type-substitution-element"
4856 },
4857 {
4858 "include": "#string-character-escape"
4859 }
4860 ]
4861 }
4862 ]
4863 },
4864 "template-type-substitution-element": {
4865 "name": "meta.template.expression.js",
4866 "begin": "\\$\\{",
4867 "beginCaptures": {
4868 "0": {
4869 "name": "punctuation.definition.template-expression.begin.js"
4870 }
4871 },
4872 "end": "\\}",
4873 "endCaptures": {
4874 "0": {
4875 "name": "punctuation.definition.template-expression.end.js"
4876 }
4877 },
4878 "patterns": [
4879 {
4880 "include": "#type"
4881 }
4882 ],
4883 "contentName": "meta.embedded.line.js"
4884 },
4885 "regex": {
4886 "patterns": [
4887 {
4888 "name": "string.regexp.js",
4889 "begin": "(?<!\\+\\+|--|})(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
4890 "beginCaptures": {
4891 "1": {
4892 "name": "punctuation.definition.string.begin.js"
4893 }
4894 },
4895 "end": "(/)([dgimsuy]*)",
4896 "endCaptures": {
4897 "1": {
4898 "name": "punctuation.definition.string.end.js"
4899 },
4900 "2": {
4901 "name": "keyword.other.js"
4902 }
4903 },
4904 "patterns": [
4905 {
4906 "include": "#regexp"
4907 }
4908 ]
4909 },
4910 {
4911 "name": "string.regexp.js",
4912 "begin": "((?<![_$[:alnum:])\\]]|\\+\\+|--|}|\\*\\/)|((?<=^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case))\\s*)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
4913 "beginCaptures": {
4914 "0": {
4915 "name": "punctuation.definition.string.begin.js"
4916 }
4917 },
4918 "end": "(/)([dgimsuy]*)",
4919 "endCaptures": {
4920 "1": {
4921 "name": "punctuation.definition.string.end.js"
4922 },
4923 "2": {
4924 "name": "keyword.other.js"
4925 }
4926 },
4927 "patterns": [
4928 {
4929 "include": "#regexp"
4930 }
4931 ]
4932 }
4933 ]
4934 },
4935 "regexp": {
4936 "patterns": [
4937 {
4938 "name": "keyword.control.anchor.regexp",
4939 "match": "\\\\[bB]|\\^|\\$"
4940 },
4941 {
4942 "match": "\\\\[1-9]\\d*|\\\\k<([a-zA-Z_$][\\w$]*)>",
4943 "captures": {
4944 "0": {
4945 "name": "keyword.other.back-reference.regexp"
4946 },
4947 "1": {
4948 "name": "variable.other.regexp"
4949 }
4950 }
4951 },
4952 {
4953 "name": "keyword.operator.quantifier.regexp",
4954 "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??"
4955 },
4956 {
4957 "name": "keyword.operator.or.regexp",
4958 "match": "\\|"
4959 },
4960 {
4961 "name": "meta.group.assertion.regexp",
4962 "begin": "(\\()((\\?=)|(\\?!)|(\\?<=)|(\\?<!))",
4963 "beginCaptures": {
4964 "1": {
4965 "name": "punctuation.definition.group.regexp"
4966 },
4967 "2": {
4968 "name": "punctuation.definition.group.assertion.regexp"
4969 },
4970 "3": {
4971 "name": "meta.assertion.look-ahead.regexp"
4972 },
4973 "4": {
4974 "name": "meta.assertion.negative-look-ahead.regexp"
4975 },
4976 "5": {
4977 "name": "meta.assertion.look-behind.regexp"
4978 },
4979 "6": {
4980 "name": "meta.assertion.negative-look-behind.regexp"
4981 }
4982 },
4983 "end": "(\\))",
4984 "endCaptures": {
4985 "1": {
4986 "name": "punctuation.definition.group.regexp"
4987 }
4988 },
4989 "patterns": [
4990 {
4991 "include": "#regexp"
4992 }
4993 ]
4994 },
4995 {
4996 "name": "meta.group.regexp",
4997 "begin": "\\((?:(\\?:)|(?:\\?<([a-zA-Z_$][\\w$]*)>))?",
4998 "beginCaptures": {
4999 "0": {
5000 "name": "punctuation.definition.group.regexp"
5001 },
5002 "1": {
5003 "name": "punctuation.definition.group.no-capture.regexp"
5004 },
5005 "2": {
5006 "name": "variable.other.regexp"
5007 }
5008 },
5009 "end": "\\)",
5010 "endCaptures": {
5011 "0": {
5012 "name": "punctuation.definition.group.regexp"
5013 }
5014 },
5015 "patterns": [
5016 {
5017 "include": "#regexp"
5018 }
5019 ]
5020 },
5021 {
5022 "name": "constant.other.character-class.set.regexp",
5023 "begin": "(\\[)(\\^)?",
5024 "beginCaptures": {
5025 "1": {
5026 "name": "punctuation.definition.character-class.regexp"
5027 },
5028 "2": {
5029 "name": "keyword.operator.negation.regexp"
5030 }
5031 },
5032 "end": "(\\])",
5033 "endCaptures": {
5034 "1": {
5035 "name": "punctuation.definition.character-class.regexp"
5036 }
5037 },
5038 "patterns": [
5039 {
5040 "name": "constant.other.character-class.range.regexp",
5041 "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])|(\\\\.))",
5042 "captures": {
5043 "1": {
5044 "name": "constant.character.numeric.regexp"
5045 },
5046 "2": {
5047 "name": "constant.character.control.regexp"
5048 },
5049 "3": {
5050 "name": "constant.character.escape.backslash.regexp"
5051 },
5052 "4": {
5053 "name": "constant.character.numeric.regexp"
5054 },
5055 "5": {
5056 "name": "constant.character.control.regexp"
5057 },
5058 "6": {
5059 "name": "constant.character.escape.backslash.regexp"
5060 }
5061 }
5062 },
5063 {
5064 "include": "#regex-character-class"
5065 }
5066 ]
5067 },
5068 {
5069 "include": "#regex-character-class"
5070 }
5071 ]
5072 },
5073 "regex-character-class": {
5074 "patterns": [
5075 {
5076 "name": "constant.other.character-class.regexp",
5077 "match": "\\\\[wWsSdDtrnvf]|\\."
5078 },
5079 {
5080 "name": "constant.character.numeric.regexp",
5081 "match": "\\\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})"
5082 },
5083 {
5084 "name": "constant.character.control.regexp",
5085 "match": "\\\\c[A-Z]"
5086 },
5087 {
5088 "name": "constant.character.escape.backslash.regexp",
5089 "match": "\\\\."
5090 }
5091 ]
5092 },
5093 "comment": {
5094 "patterns": [
5095 {
5096 "name": "comment.block.documentation.js",
5097 "begin": "/\\*\\*(?!/)",
5098 "beginCaptures": {
5099 "0": {
5100 "name": "punctuation.definition.comment.js"
5101 }
5102 },
5103 "end": "\\*/",
5104 "endCaptures": {
5105 "0": {
5106 "name": "punctuation.definition.comment.js"
5107 }
5108 },
5109 "patterns": [
5110 {
5111 "include": "#docblock"
5112 }
5113 ]
5114 },
5115 {
5116 "name": "comment.block.js",
5117 "begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?",
5118 "beginCaptures": {
5119 "1": {
5120 "name": "punctuation.definition.comment.js"
5121 },
5122 "2": {
5123 "name": "storage.type.internaldeclaration.js"
5124 },
5125 "3": {
5126 "name": "punctuation.decorator.internaldeclaration.js"
5127 }
5128 },
5129 "end": "\\*/",
5130 "endCaptures": {
5131 "0": {
5132 "name": "punctuation.definition.comment.js"
5133 }
5134 }
5135 },
5136 {
5137 "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)",
5138 "beginCaptures": {
5139 "1": {
5140 "name": "punctuation.whitespace.comment.leading.js"
5141 },
5142 "2": {
5143 "name": "comment.line.double-slash.js"
5144 },
5145 "3": {
5146 "name": "punctuation.definition.comment.js"
5147 },
5148 "4": {
5149 "name": "storage.type.internaldeclaration.js"
5150 },
5151 "5": {
5152 "name": "punctuation.decorator.internaldeclaration.js"
5153 }
5154 },
5155 "end": "(?=$)",
5156 "contentName": "comment.line.double-slash.js"
5157 }
5158 ]
5159 },
5160 "single-line-comment-consuming-line-ending": {
5161 "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)",
5162 "beginCaptures": {
5163 "1": {
5164 "name": "punctuation.whitespace.comment.leading.js"
5165 },
5166 "2": {
5167 "name": "comment.line.double-slash.js"
5168 },
5169 "3": {
5170 "name": "punctuation.definition.comment.js"
5171 },
5172 "4": {
5173 "name": "storage.type.internaldeclaration.js"
5174 },
5175 "5": {
5176 "name": "punctuation.decorator.internaldeclaration.js"
5177 }
5178 },
5179 "end": "(?=^)",
5180 "contentName": "comment.line.double-slash.js"
5181 },
5182 "directives": {
5183 "name": "comment.line.triple-slash.directive.js",
5184 "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name|resolution-mode)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)",
5185 "beginCaptures": {
5186 "1": {
5187 "name": "punctuation.definition.comment.js"
5188 }
5189 },
5190 "end": "(?=$)",
5191 "patterns": [
5192 {
5193 "name": "meta.tag.js",
5194 "begin": "(<)(reference|amd-dependency|amd-module)",
5195 "beginCaptures": {
5196 "1": {
5197 "name": "punctuation.definition.tag.directive.js"
5198 },
5199 "2": {
5200 "name": "entity.name.tag.directive.js"
5201 }
5202 },
5203 "end": "/>",
5204 "endCaptures": {
5205 "0": {
5206 "name": "punctuation.definition.tag.directive.js"
5207 }
5208 },
5209 "patterns": [
5210 {
5211 "name": "entity.other.attribute-name.directive.js",
5212 "match": "path|types|no-default-lib|lib|name|resolution-mode"
5213 },
5214 {
5215 "name": "keyword.operator.assignment.js",
5216 "match": "="
5217 },
5218 {
5219 "include": "#string"
5220 }
5221 ]
5222 }
5223 ]
5224 },
5225 "docblock": {
5226 "patterns": [
5227 {
5228 "match": "(?x)\n((@)(?:access|api))\n\\s+\n(private|protected|public)\n\\b",
5229 "captures": {
5230 "1": {
5231 "name": "storage.type.class.jsdoc"
5232 },
5233 "2": {
5234 "name": "punctuation.definition.block.tag.jsdoc"
5235 },
5236 "3": {
5237 "name": "constant.language.access-type.jsdoc"
5238 }
5239 }
5240 },
5241 {
5242 "match": "(?x)\n((@)author)\n\\s+\n(\n [^@\\s<>*/]\n (?:[^@<>*/]|\\*[^/])*\n)\n(?:\n \\s*\n (<)\n ([^>\\s]+)\n (>)\n)?",
5243 "captures": {
5244 "1": {
5245 "name": "storage.type.class.jsdoc"
5246 },
5247 "2": {
5248 "name": "punctuation.definition.block.tag.jsdoc"
5249 },
5250 "3": {
5251 "name": "entity.name.type.instance.jsdoc"
5252 },
5253 "4": {
5254 "name": "punctuation.definition.bracket.angle.begin.jsdoc"
5255 },
5256 "5": {
5257 "name": "constant.other.email.link.underline.jsdoc"
5258 },
5259 "6": {
5260 "name": "punctuation.definition.bracket.angle.end.jsdoc"
5261 }
5262 }
5263 },
5264 {
5265 "match": "(?x)\n((@)borrows) \\s+\n((?:[^@\\s*/]|\\*[^/])+) # <that namepath>\n\\s+ (as) \\s+ # as\n((?:[^@\\s*/]|\\*[^/])+) # <this namepath>",
5266 "captures": {
5267 "1": {
5268 "name": "storage.type.class.jsdoc"
5269 },
5270 "2": {
5271 "name": "punctuation.definition.block.tag.jsdoc"
5272 },
5273 "3": {
5274 "name": "entity.name.type.instance.jsdoc"
5275 },
5276 "4": {
5277 "name": "keyword.operator.control.jsdoc"
5278 },
5279 "5": {
5280 "name": "entity.name.type.instance.jsdoc"
5281 }
5282 }
5283 },
5284 {
5285 "name": "meta.example.jsdoc",
5286 "begin": "((@)example)\\s+",
5287 "end": "(?=@|\\*/)",
5288 "beginCaptures": {
5289 "1": {
5290 "name": "storage.type.class.jsdoc"
5291 },
5292 "2": {
5293 "name": "punctuation.definition.block.tag.jsdoc"
5294 }
5295 },
5296 "patterns": [
5297 {
5298 "match": "^\\s\\*\\s+"
5299 },
5300 {
5301 "contentName": "constant.other.description.jsdoc",
5302 "begin": "\\G(<)caption(>)",
5303 "beginCaptures": {
5304 "0": {
5305 "name": "entity.name.tag.inline.jsdoc"
5306 },
5307 "1": {
5308 "name": "punctuation.definition.bracket.angle.begin.jsdoc"
5309 },
5310 "2": {
5311 "name": "punctuation.definition.bracket.angle.end.jsdoc"
5312 }
5313 },
5314 "end": "(</)caption(>)|(?=\\*/)",
5315 "endCaptures": {
5316 "0": {
5317 "name": "entity.name.tag.inline.jsdoc"
5318 },
5319 "1": {
5320 "name": "punctuation.definition.bracket.angle.begin.jsdoc"
5321 },
5322 "2": {
5323 "name": "punctuation.definition.bracket.angle.end.jsdoc"
5324 }
5325 }
5326 },
5327 {
5328 "match": "[^\\s@*](?:[^*]|\\*[^/])*",
5329 "captures": {
5330 "0": {
5331 "name": "source.embedded.js"
5332 }
5333 }
5334 }
5335 ]
5336 },
5337 {
5338 "match": "(?x) ((@)kind) \\s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \\b",
5339 "captures": {
5340 "1": {
5341 "name": "storage.type.class.jsdoc"
5342 },
5343 "2": {
5344 "name": "punctuation.definition.block.tag.jsdoc"
5345 },
5346 "3": {
5347 "name": "constant.language.symbol-type.jsdoc"
5348 }
5349 }
5350 },
5351 {
5352 "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)",
5353 "captures": {
5354 "1": {
5355 "name": "storage.type.class.jsdoc"
5356 },
5357 "2": {
5358 "name": "punctuation.definition.block.tag.jsdoc"
5359 },
5360 "3": {
5361 "name": "variable.other.link.underline.jsdoc"
5362 },
5363 "4": {
5364 "name": "entity.name.type.instance.jsdoc"
5365 }
5366 }
5367 },
5368 {
5369 "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)",
5370 "captures": {
5371 "1": {
5372 "name": "storage.type.class.jsdoc"
5373 },
5374 "2": {
5375 "name": "punctuation.definition.block.tag.jsdoc"
5376 },
5377 "3": {
5378 "name": "variable.other.jsdoc"
5379 }
5380 }
5381 },
5382 {
5383 "begin": "(?x)((@)template)\\s+(?={)",
5384 "beginCaptures": {
5385 "1": {
5386 "name": "storage.type.class.jsdoc"
5387 },
5388 "2": {
5389 "name": "punctuation.definition.block.tag.jsdoc"
5390 }
5391 },
5392 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5393 "patterns": [
5394 {
5395 "include": "#jsdoctype"
5396 },
5397 {
5398 "name": "variable.other.jsdoc",
5399 "match": "([A-Za-z_$][\\w$.\\[\\]]*)"
5400 }
5401 ]
5402 },
5403 {
5404 "match": "(?x)\n(\n (@)\n (?:arg|argument|const|constant|member|namespace|param|var)\n)\n\\s+\n(\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n)",
5405 "captures": {
5406 "1": {
5407 "name": "storage.type.class.jsdoc"
5408 },
5409 "2": {
5410 "name": "punctuation.definition.block.tag.jsdoc"
5411 },
5412 "3": {
5413 "name": "variable.other.jsdoc"
5414 }
5415 }
5416 },
5417 {
5418 "begin": "((@)typedef)\\s+(?={)",
5419 "beginCaptures": {
5420 "1": {
5421 "name": "storage.type.class.jsdoc"
5422 },
5423 "2": {
5424 "name": "punctuation.definition.block.tag.jsdoc"
5425 }
5426 },
5427 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5428 "patterns": [
5429 {
5430 "include": "#jsdoctype"
5431 },
5432 {
5433 "name": "entity.name.type.instance.jsdoc",
5434 "match": "(?:[^@\\s*/]|\\*[^/])+"
5435 }
5436 ]
5437 },
5438 {
5439 "begin": "((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?={)",
5440 "beginCaptures": {
5441 "1": {
5442 "name": "storage.type.class.jsdoc"
5443 },
5444 "2": {
5445 "name": "punctuation.definition.block.tag.jsdoc"
5446 }
5447 },
5448 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5449 "patterns": [
5450 {
5451 "include": "#jsdoctype"
5452 },
5453 {
5454 "name": "variable.other.jsdoc",
5455 "match": "([A-Za-z_$][\\w$.\\[\\]]*)"
5456 },
5457 {
5458 "name": "variable.other.jsdoc",
5459 "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/])+)?|(?=\\*/))",
5460 "captures": {
5461 "1": {
5462 "name": "punctuation.definition.optional-value.begin.bracket.square.jsdoc"
5463 },
5464 "2": {
5465 "name": "keyword.operator.assignment.jsdoc"
5466 },
5467 "3": {
5468 "name": "source.embedded.js"
5469 },
5470 "4": {
5471 "name": "punctuation.definition.optional-value.end.bracket.square.jsdoc"
5472 },
5473 "5": {
5474 "name": "invalid.illegal.syntax.jsdoc"
5475 }
5476 }
5477 }
5478 ]
5479 },
5480 {
5481 "begin": "(?x)\n(\n (@)\n (?:define|enum|exception|export|extends|lends|implements|modifies\n |namespace|private|protected|returns?|satisfies|suppress|this|throws|type\n |yields?)\n)\n\\s+(?={)",
5482 "beginCaptures": {
5483 "1": {
5484 "name": "storage.type.class.jsdoc"
5485 },
5486 "2": {
5487 "name": "punctuation.definition.block.tag.jsdoc"
5488 }
5489 },
5490 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5491 "patterns": [
5492 {
5493 "include": "#jsdoctype"
5494 }
5495 ]
5496 },
5497 {
5498 "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)",
5499 "captures": {
5500 "1": {
5501 "name": "storage.type.class.jsdoc"
5502 },
5503 "2": {
5504 "name": "punctuation.definition.block.tag.jsdoc"
5505 },
5506 "3": {
5507 "name": "entity.name.type.instance.jsdoc"
5508 }
5509 }
5510 },
5511 {
5512 "contentName": "variable.other.jsdoc",
5513 "begin": "((@)(?:default(?:value)?|license|version))\\s+(([''\"]))",
5514 "beginCaptures": {
5515 "1": {
5516 "name": "storage.type.class.jsdoc"
5517 },
5518 "2": {
5519 "name": "punctuation.definition.block.tag.jsdoc"
5520 },
5521 "3": {
5522 "name": "variable.other.jsdoc"
5523 },
5524 "4": {
5525 "name": "punctuation.definition.string.begin.jsdoc"
5526 }
5527 },
5528 "end": "(\\3)|(?=$|\\*/)",
5529 "endCaptures": {
5530 "0": {
5531 "name": "variable.other.jsdoc"
5532 },
5533 "1": {
5534 "name": "punctuation.definition.string.end.jsdoc"
5535 }
5536 }
5537 },
5538 {
5539 "match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^\\s*]+)",
5540 "captures": {
5541 "1": {
5542 "name": "storage.type.class.jsdoc"
5543 },
5544 "2": {
5545 "name": "punctuation.definition.block.tag.jsdoc"
5546 },
5547 "3": {
5548 "name": "variable.other.jsdoc"
5549 }
5550 }
5551 },
5552 {
5553 "name": "storage.type.class.jsdoc",
5554 "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",
5555 "captures": {
5556 "1": {
5557 "name": "punctuation.definition.block.tag.jsdoc"
5558 }
5559 }
5560 },
5561 {
5562 "include": "#inline-tags"
5563 },
5564 {
5565 "match": "((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\\s+)",
5566 "captures": {
5567 "1": {
5568 "name": "storage.type.class.jsdoc"
5569 },
5570 "2": {
5571 "name": "punctuation.definition.block.tag.jsdoc"
5572 }
5573 }
5574 }
5575 ]
5576 },
5577 "brackets": {
5578 "patterns": [
5579 {
5580 "begin": "{",
5581 "end": "}|(?=\\*/)",
5582 "patterns": [
5583 {
5584 "include": "#brackets"
5585 }
5586 ]
5587 },
5588 {
5589 "begin": "\\[",
5590 "end": "\\]|(?=\\*/)",
5591 "patterns": [
5592 {
5593 "include": "#brackets"
5594 }
5595 ]
5596 }
5597 ]
5598 },
5599 "inline-tags": {
5600 "patterns": [
5601 {
5602 "name": "constant.other.description.jsdoc",
5603 "match": "(\\[)[^\\]]+(\\])(?={@(?:link|linkcode|linkplain|tutorial))",
5604 "captures": {
5605 "1": {
5606 "name": "punctuation.definition.bracket.square.begin.jsdoc"
5607 },
5608 "2": {
5609 "name": "punctuation.definition.bracket.square.end.jsdoc"
5610 }
5611 }
5612 },
5613 {
5614 "name": "entity.name.type.instance.jsdoc",
5615 "begin": "({)((@)(?:link(?:code|plain)?|tutorial))\\s*",
5616 "beginCaptures": {
5617 "1": {
5618 "name": "punctuation.definition.bracket.curly.begin.jsdoc"
5619 },
5620 "2": {
5621 "name": "storage.type.class.jsdoc"
5622 },
5623 "3": {
5624 "name": "punctuation.definition.inline.tag.jsdoc"
5625 }
5626 },
5627 "end": "}|(?=\\*/)",
5628 "endCaptures": {
5629 "0": {
5630 "name": "punctuation.definition.bracket.curly.end.jsdoc"
5631 }
5632 },
5633 "patterns": [
5634 {
5635 "match": "\\G((?=https?://)(?:[^|}\\s*]|\\*[/])+)(\\|)?",
5636 "captures": {
5637 "1": {
5638 "name": "variable.other.link.underline.jsdoc"
5639 },
5640 "2": {
5641 "name": "punctuation.separator.pipe.jsdoc"
5642 }
5643 }
5644 },
5645 {
5646 "match": "\\G((?:[^{}@\\s|*]|\\*[^/])+)(\\|)?",
5647 "captures": {
5648 "1": {
5649 "name": "variable.other.description.jsdoc"
5650 },
5651 "2": {
5652 "name": "punctuation.separator.pipe.jsdoc"
5653 }
5654 }
5655 }
5656 ]
5657 }
5658 ]
5659 },
5660 "jsdoctype": {
5661 "patterns": [
5662 {
5663 "contentName": "entity.name.type.instance.jsdoc",
5664 "begin": "\\G({)",
5665 "beginCaptures": {
5666 "0": {
5667 "name": "entity.name.type.instance.jsdoc"
5668 },
5669 "1": {
5670 "name": "punctuation.definition.bracket.curly.begin.jsdoc"
5671 }
5672 },
5673 "end": "((}))\\s*|(?=\\*/)",
5674 "endCaptures": {
5675 "1": {
5676 "name": "entity.name.type.instance.jsdoc"
5677 },
5678 "2": {
5679 "name": "punctuation.definition.bracket.curly.end.jsdoc"
5680 }
5681 },
5682 "patterns": [
5683 {
5684 "include": "#brackets"
5685 }
5686 ]
5687 }
5688 ]
5689 },
5690 "jsx": {
5691 "patterns": [
5692 {
5693 "include": "#jsx-tag-without-attributes-in-expression"
5694 },
5695 {
5696 "include": "#jsx-tag-in-expression"
5697 }
5698 ]
5699 },
5700 "jsx-tag-without-attributes-in-expression": {
5701 "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*(>))",
5702 "end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>))",
5703 "patterns": [
5704 {
5705 "include": "#jsx-tag-without-attributes"
5706 }
5707 ]
5708 },
5709 "jsx-tag-without-attributes": {
5710 "name": "meta.tag.without-attributes.js",
5711 "begin": "(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>)",
5712 "end": "(</)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>)",
5713 "beginCaptures": {
5714 "1": {
5715 "name": "punctuation.definition.tag.begin.js"
5716 },
5717 "2": {
5718 "name": "entity.name.tag.namespace.js"
5719 },
5720 "3": {
5721 "name": "punctuation.separator.namespace.js"
5722 },
5723 "4": {
5724 "name": "entity.name.tag.js"
5725 },
5726 "5": {
5727 "name": "support.class.component.js"
5728 },
5729 "6": {
5730 "name": "punctuation.definition.tag.end.js"
5731 }
5732 },
5733 "endCaptures": {
5734 "1": {
5735 "name": "punctuation.definition.tag.begin.js"
5736 },
5737 "2": {
5738 "name": "entity.name.tag.namespace.js"
5739 },
5740 "3": {
5741 "name": "punctuation.separator.namespace.js"
5742 },
5743 "4": {
5744 "name": "entity.name.tag.js"
5745 },
5746 "5": {
5747 "name": "support.class.component.js"
5748 },
5749 "6": {
5750 "name": "punctuation.definition.tag.end.js"
5751 }
5752 },
5753 "contentName": "meta.jsx.children.js",
5754 "patterns": [
5755 {
5756 "include": "#jsx-children"
5757 }
5758 ]
5759 },
5760 "jsx-tag-in-expression": {
5761 "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+))(?!\\?)|\\/?>))",
5762 "end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>))",
5763 "patterns": [
5764 {
5765 "include": "#jsx-tag"
5766 }
5767 ]
5768 },
5769 "jsx-tag": {
5770 "name": "meta.tag.js",
5771 "begin": "(?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>))",
5772 "end": "(/>)|(?:(</)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>))",
5773 "endCaptures": {
5774 "1": {
5775 "name": "punctuation.definition.tag.end.js"
5776 },
5777 "2": {
5778 "name": "punctuation.definition.tag.begin.js"
5779 },
5780 "3": {
5781 "name": "entity.name.tag.namespace.js"
5782 },
5783 "4": {
5784 "name": "punctuation.separator.namespace.js"
5785 },
5786 "5": {
5787 "name": "entity.name.tag.js"
5788 },
5789 "6": {
5790 "name": "support.class.component.js"
5791 },
5792 "7": {
5793 "name": "punctuation.definition.tag.end.js"
5794 }
5795 },
5796 "patterns": [
5797 {
5798 "begin": "(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>)",
5799 "beginCaptures": {
5800 "1": {
5801 "name": "punctuation.definition.tag.begin.js"
5802 },
5803 "2": {
5804 "name": "entity.name.tag.namespace.js"
5805 },
5806 "3": {
5807 "name": "punctuation.separator.namespace.js"
5808 },
5809 "4": {
5810 "name": "entity.name.tag.js"
5811 },
5812 "5": {
5813 "name": "support.class.component.js"
5814 }
5815 },
5816 "end": "(?=[/]?>)",
5817 "patterns": [
5818 {
5819 "include": "#comment"
5820 },
5821 {
5822 "include": "#type-arguments"
5823 },
5824 {
5825 "include": "#jsx-tag-attributes"
5826 }
5827 ]
5828 },
5829 {
5830 "begin": "(>)",
5831 "beginCaptures": {
5832 "1": {
5833 "name": "punctuation.definition.tag.end.js"
5834 }
5835 },
5836 "end": "(?=</)",
5837 "contentName": "meta.jsx.children.js",
5838 "patterns": [
5839 {
5840 "include": "#jsx-children"
5841 }
5842 ]
5843 }
5844 ]
5845 },
5846 "jsx-children": {
5847 "patterns": [
5848 {
5849 "include": "#jsx-tag-without-attributes"
5850 },
5851 {
5852 "include": "#jsx-tag"
5853 },
5854 {
5855 "include": "#jsx-evaluated-code"
5856 },
5857 {
5858 "include": "#jsx-entities"
5859 }
5860 ]
5861 },
5862 "jsx-evaluated-code": {
5863 "contentName": "meta.embedded.expression.js",
5864 "begin": "\\{",
5865 "end": "\\}",
5866 "beginCaptures": {
5867 "0": {
5868 "name": "punctuation.section.embedded.begin.js"
5869 }
5870 },
5871 "endCaptures": {
5872 "0": {
5873 "name": "punctuation.section.embedded.end.js"
5874 }
5875 },
5876 "patterns": [
5877 {
5878 "include": "#expression"
5879 }
5880 ]
5881 },
5882 "jsx-entities": {
5883 "patterns": [
5884 {
5885 "name": "constant.character.entity.js",
5886 "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
5887 "captures": {
5888 "1": {
5889 "name": "punctuation.definition.entity.js"
5890 },
5891 "3": {
5892 "name": "punctuation.definition.entity.js"
5893 }
5894 }
5895 }
5896 ]
5897 },
5898 "jsx-tag-attributes": {
5899 "name": "meta.tag.attributes.js",
5900 "begin": "\\s+",
5901 "end": "(?=[/]?>)",
5902 "patterns": [
5903 {
5904 "include": "#comment"
5905 },
5906 {
5907 "include": "#jsx-tag-attribute-name"
5908 },
5909 {
5910 "include": "#jsx-tag-attribute-assignment"
5911 },
5912 {
5913 "include": "#jsx-string-double-quoted"
5914 },
5915 {
5916 "include": "#jsx-string-single-quoted"
5917 },
5918 {
5919 "include": "#jsx-evaluated-code"
5920 },
5921 {
5922 "include": "#jsx-tag-attributes-illegal"
5923 }
5924 ]
5925 },
5926 "jsx-tag-attribute-name": {
5927 "match": "(?x)\n \\s*\n (?:([_$[:alpha:]][-_$[:alnum:].]*)(:))?\n ([_$[:alpha:]][-_$[:alnum:]]*)\n (?=\\s|=|/?>|/\\*|//)",
5928 "captures": {
5929 "1": {
5930 "name": "entity.other.attribute-name.namespace.js"
5931 },
5932 "2": {
5933 "name": "punctuation.separator.namespace.js"
5934 },
5935 "3": {
5936 "name": "entity.other.attribute-name.js"
5937 }
5938 }
5939 },
5940 "jsx-tag-attribute-assignment": {
5941 "name": "keyword.operator.assignment.js",
5942 "match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))"
5943 },
5944 "jsx-string-double-quoted": {
5945 "name": "string.quoted.double.js",
5946 "begin": "\"",
5947 "end": "\"",
5948 "beginCaptures": {
5949 "0": {
5950 "name": "punctuation.definition.string.begin.js"
5951 }
5952 },
5953 "endCaptures": {
5954 "0": {
5955 "name": "punctuation.definition.string.end.js"
5956 }
5957 },
5958 "patterns": [
5959 {
5960 "include": "#jsx-entities"
5961 }
5962 ]
5963 },
5964 "jsx-string-single-quoted": {
5965 "name": "string.quoted.single.js",
5966 "begin": "'",
5967 "end": "'",
5968 "beginCaptures": {
5969 "0": {
5970 "name": "punctuation.definition.string.begin.js"
5971 }
5972 },
5973 "endCaptures": {
5974 "0": {
5975 "name": "punctuation.definition.string.end.js"
5976 }
5977 },
5978 "patterns": [
5979 {
5980 "include": "#jsx-entities"
5981 }
5982 ]
5983 },
5984 "jsx-tag-attributes-illegal": {
5985 "name": "invalid.illegal.attribute.js",
5986 "match": "\\S+"
5987 }
5988 }
5989 }
5990