Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json
3316 views
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/48f608692aa6d6ad7bd65b478187906c798234a8",
8
"name": "JavaScript (with React support)",
9
"scopeName": "source.js.jsx",
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.jsx",
24
"match": "\\A(#!).*(?=$)",
25
"captures": {
26
"1": {
27
"name": "punctuation.definition.comment.js.jsx"
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.jsx",
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.jsx",
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.jsx"
120
},
121
"2": {
122
"name": "entity.name.label.js.jsx"
123
}
124
}
125
},
126
{
127
"name": "keyword.control.loop.js.jsx",
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.jsx"
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.jsx",
146
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
147
},
148
{
149
"include": "#if-statement"
150
},
151
{
152
"name": "keyword.control.conditional.js.jsx",
153
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(else|if)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
154
},
155
{
156
"name": "keyword.control.with.js.jsx",
157
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(with)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
158
},
159
{
160
"name": "keyword.control.js.jsx",
161
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(package)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
162
},
163
{
164
"name": "keyword.other.debugger.js.jsx",
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.jsx"
176
},
177
"2": {
178
"name": "punctuation.separator.label.js.jsx"
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.jsx"
193
},
194
"2": {
195
"name": "punctuation.separator.label.js.jsx"
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.jsx",
284
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))\\@",
285
"beginCaptures": {
286
"0": {
287
"name": "punctuation.decorator.js.jsx"
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.jsx",
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.jsx"
309
},
310
"2": {
311
"name": "storage.modifier.js.jsx"
312
},
313
"3": {
314
"name": "storage.type.js.jsx"
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.jsx"
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.jsx",
364
"begin": "(?=(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))",
365
"beginCaptures": {
366
"1": {
367
"name": "keyword.control.export.js.jsx"
368
},
369
"2": {
370
"name": "storage.modifier.js.jsx"
371
},
372
"3": {
373
"name": "storage.type.js.jsx"
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.jsx"
383
},
384
"2": {
385
"name": "storage.modifier.js.jsx"
386
},
387
"3": {
388
"name": "storage.type.js.jsx"
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.jsx"
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.jsx",
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.jsx"
442
},
443
"2": {
444
"name": "storage.modifier.js.jsx"
445
},
446
"3": {
447
"name": "storage.type.js.jsx"
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.jsx"
457
},
458
"2": {
459
"name": "storage.modifier.js.jsx"
460
},
461
"3": {
462
"name": "storage.type.js.jsx"
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.jsx"
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.jsx",
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.jsx entity.name.function.js.jsx"
514
},
515
"2": {
516
"name": "keyword.operator.definiteassignment.js.jsx"
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.jsx",
528
"begin": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])(\\!)?",
529
"beginCaptures": {
530
"1": {
531
"name": "meta.definition.variable.js.jsx variable.other.constant.js.jsx"
532
},
533
"2": {
534
"name": "keyword.operator.definiteassignment.js.jsx"
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.jsx",
546
"begin": "([_$[:alpha:]][_$[:alnum:]]*)(\\!)?",
547
"beginCaptures": {
548
"1": {
549
"name": "meta.definition.variable.js.jsx variable.other.readwrite.js.jsx"
550
},
551
"2": {
552
"name": "keyword.operator.definiteassignment.js.jsx"
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.jsx",
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.jsx variable.other.constant.js.jsx entity.name.function.js.jsx"
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.jsx",
583
"begin": "([_$[:alpha:]][_$[:alnum:]]*)",
584
"beginCaptures": {
585
"1": {
586
"name": "meta.definition.variable.js.jsx variable.other.constant.js.jsx"
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.jsx",
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.jsx",
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.jsx",
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.jsx",
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.jsx"
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.jsx",
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.jsx"
830
},
831
"2": {
832
"name": "meta.definition.variable.js.jsx variable.other.readwrite.js.jsx"
833
}
834
}
835
},
836
"destructuring-variable-rest-const": {
837
"match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
838
"captures": {
839
"1": {
840
"name": "keyword.operator.rest.js.jsx"
841
},
842
"2": {
843
"name": "meta.definition.variable.js.jsx variable.other.constant.js.jsx"
844
}
845
}
846
},
847
"object-binding-pattern": {
848
"begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
849
"beginCaptures": {
850
"1": {
851
"name": "keyword.operator.rest.js.jsx"
852
},
853
"2": {
854
"name": "punctuation.definition.binding-pattern.object.js.jsx"
855
}
856
},
857
"end": "\\}",
858
"endCaptures": {
859
"0": {
860
"name": "punctuation.definition.binding-pattern.object.js.jsx"
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.jsx"
874
},
875
"2": {
876
"name": "punctuation.definition.binding-pattern.object.js.jsx"
877
}
878
},
879
"end": "\\}",
880
"endCaptures": {
881
"0": {
882
"name": "punctuation.definition.binding-pattern.object.js.jsx"
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.jsx"
896
},
897
"2": {
898
"name": "punctuation.definition.binding-pattern.array.js.jsx"
899
}
900
},
901
"end": "\\]",
902
"endCaptures": {
903
"0": {
904
"name": "punctuation.definition.binding-pattern.array.js.jsx"
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.jsx"
921
},
922
"2": {
923
"name": "punctuation.definition.binding-pattern.array.js.jsx"
924
}
925
},
926
"end": "\\]",
927
"endCaptures": {
928
"0": {
929
"name": "punctuation.definition.binding-pattern.array.js.jsx"
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.jsx"
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.jsx"
956
},
957
"2": {
958
"name": "keyword.operator.rest.js.jsx"
959
},
960
"3": {
961
"name": "entity.name.function.js.jsx variable.language.this.js.jsx"
962
},
963
"4": {
964
"name": "entity.name.function.js.jsx"
965
},
966
"5": {
967
"name": "keyword.operator.optional.js.jsx"
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.jsx"
976
},
977
"2": {
978
"name": "keyword.operator.rest.js.jsx"
979
},
980
"3": {
981
"name": "variable.parameter.js.jsx variable.language.this.js.jsx"
982
},
983
"4": {
984
"name": "variable.parameter.js.jsx"
985
},
986
"5": {
987
"name": "keyword.operator.optional.js.jsx"
988
}
989
}
990
}
991
]
992
},
993
"destructuring-parameter": {
994
"patterns": [
995
{
996
"name": "meta.parameter.object-binding-pattern.js.jsx",
997
"begin": "(?<!=|:)\\s*(?:(\\.\\.\\.)\\s*)?(\\{)",
998
"beginCaptures": {
999
"1": {
1000
"name": "keyword.operator.rest.js.jsx"
1001
},
1002
"2": {
1003
"name": "punctuation.definition.binding-pattern.object.js.jsx"
1004
}
1005
},
1006
"end": "\\}",
1007
"endCaptures": {
1008
"0": {
1009
"name": "punctuation.definition.binding-pattern.object.js.jsx"
1010
}
1011
},
1012
"patterns": [
1013
{
1014
"include": "#parameter-object-binding-element"
1015
}
1016
]
1017
},
1018
{
1019
"name": "meta.paramter.array-binding-pattern.js.jsx",
1020
"begin": "(?<!=|:)\\s*(?:(\\.\\.\\.)\\s*)?(\\[)",
1021
"beginCaptures": {
1022
"1": {
1023
"name": "keyword.operator.rest.js.jsx"
1024
},
1025
"2": {
1026
"name": "punctuation.definition.binding-pattern.array.js.jsx"
1027
}
1028
},
1029
"end": "\\]",
1030
"endCaptures": {
1031
"0": {
1032
"name": "punctuation.definition.binding-pattern.array.js.jsx"
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.jsx"
1113
},
1114
"2": {
1115
"name": "variable.parameter.js.jsx"
1116
}
1117
}
1118
},
1119
"parameter-object-binding-pattern": {
1120
"begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
1121
"beginCaptures": {
1122
"1": {
1123
"name": "keyword.operator.rest.js.jsx"
1124
},
1125
"2": {
1126
"name": "punctuation.definition.binding-pattern.object.js.jsx"
1127
}
1128
},
1129
"end": "\\}",
1130
"endCaptures": {
1131
"0": {
1132
"name": "punctuation.definition.binding-pattern.object.js.jsx"
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.jsx"
1146
},
1147
"2": {
1148
"name": "punctuation.definition.binding-pattern.array.js.jsx"
1149
}
1150
},
1151
"end": "\\]",
1152
"endCaptures": {
1153
"0": {
1154
"name": "punctuation.definition.binding-pattern.array.js.jsx"
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.jsx",
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.jsx"
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.jsx entity.name.function.js.jsx"
1199
},
1200
"2": {
1201
"name": "keyword.operator.optional.js.jsx"
1202
},
1203
"3": {
1204
"name": "keyword.operator.definiteassignment.js.jsx"
1205
}
1206
}
1207
},
1208
{
1209
"name": "meta.definition.property.js.jsx variable.object.property.js.jsx",
1210
"match": "\\#?[_$[:alpha:]][_$[:alnum:]]*"
1211
},
1212
{
1213
"name": "keyword.operator.optional.js.jsx",
1214
"match": "\\?"
1215
},
1216
{
1217
"name": "keyword.operator.definiteassignment.js.jsx",
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.jsx"
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.jsx"
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.jsx",
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.jsx"
1260
},
1261
"2": {
1262
"name": "storage.modifier.js.jsx"
1263
},
1264
"3": {
1265
"name": "storage.modifier.async.js.jsx"
1266
},
1267
"4": {
1268
"name": "storage.type.function.js.jsx"
1269
},
1270
"5": {
1271
"name": "keyword.generator.asterisk.js.jsx"
1272
},
1273
"6": {
1274
"name": "meta.definition.function.js.jsx entity.name.function.js.jsx"
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.jsx",
1289
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
1290
"beginCaptures": {
1291
"1": {
1292
"name": "storage.modifier.async.js.jsx"
1293
},
1294
"2": {
1295
"name": "storage.type.function.js.jsx"
1296
},
1297
"3": {
1298
"name": "keyword.generator.asterisk.js.jsx"
1299
},
1300
"4": {
1301
"name": "meta.definition.function.js.jsx entity.name.function.js.jsx"
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.jsx entity.name.function.js.jsx",
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.jsx",
1343
"match": "\\*"
1344
}
1345
]
1346
},
1347
"method-declaration": {
1348
"patterns": [
1349
{
1350
"name": "meta.method.declaration.js.jsx",
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.jsx"
1355
},
1356
"2": {
1357
"name": "storage.modifier.js.jsx"
1358
},
1359
"3": {
1360
"name": "storage.modifier.js.jsx"
1361
},
1362
"4": {
1363
"name": "storage.modifier.async.js.jsx"
1364
},
1365
"5": {
1366
"name": "storage.type.js.jsx"
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.jsx",
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.jsx"
1385
},
1386
"2": {
1387
"name": "storage.modifier.js.jsx"
1388
},
1389
"3": {
1390
"name": "storage.modifier.js.jsx"
1391
},
1392
"4": {
1393
"name": "storage.modifier.async.js.jsx"
1394
},
1395
"5": {
1396
"name": "keyword.operator.new.js.jsx"
1397
},
1398
"6": {
1399
"name": "keyword.generator.asterisk.js.jsx"
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.jsx",
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.jsx"
1418
},
1419
"2": {
1420
"name": "storage.modifier.js.jsx"
1421
},
1422
"3": {
1423
"name": "storage.modifier.js.jsx"
1424
},
1425
"4": {
1426
"name": "storage.modifier.async.js.jsx"
1427
},
1428
"5": {
1429
"name": "storage.type.property.js.jsx"
1430
},
1431
"6": {
1432
"name": "keyword.generator.asterisk.js.jsx"
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.jsx",
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.jsx"
1453
},
1454
"2": {
1455
"name": "storage.type.property.js.jsx"
1456
},
1457
"3": {
1458
"name": "keyword.generator.asterisk.js.jsx"
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.jsx"
1474
},
1475
"2": {
1476
"name": "storage.type.property.js.jsx"
1477
},
1478
"3": {
1479
"name": "keyword.generator.asterisk.js.jsx"
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.jsx entity.name.function.js.jsx",
1506
"match": "[_$[:alpha:]][_$[:alnum:]]*"
1507
},
1508
{
1509
"name": "keyword.operator.optional.js.jsx",
1510
"match": "\\?"
1511
}
1512
]
1513
},
1514
"arrow-function": {
1515
"patterns": [
1516
{
1517
"name": "meta.arrow.js.jsx",
1518
"match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?==>)",
1519
"captures": {
1520
"1": {
1521
"name": "storage.modifier.async.js.jsx"
1522
},
1523
"2": {
1524
"name": "variable.parameter.js.jsx"
1525
}
1526
}
1527
},
1528
{
1529
"name": "meta.arrow.js.jsx",
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.jsx"
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.jsx",
1557
"begin": "=>",
1558
"beginCaptures": {
1559
"0": {
1560
"name": "storage.type.function.arrow.js.jsx"
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.jsx",
1580
"begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s*)?\\s*(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)",
1581
"beginCaptures": {
1582
"1": {
1583
"name": "storage.modifier.js.jsx"
1584
},
1585
"2": {
1586
"name": "meta.brace.square.js.jsx"
1587
},
1588
"3": {
1589
"name": "variable.parameter.js.jsx"
1590
}
1591
},
1592
"end": "(\\])\\s*(\\?\\s*)?|$",
1593
"endCaptures": {
1594
"1": {
1595
"name": "meta.brace.square.js.jsx"
1596
},
1597
"2": {
1598
"name": "keyword.operator.optional.js.jsx"
1599
}
1600
},
1601
"patterns": [
1602
{
1603
"include": "#type-annotation"
1604
}
1605
]
1606
},
1607
"indexer-mapped-type-declaration": {
1608
"name": "meta.indexer.mappedtype.declaration.js.jsx",
1609
"begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([+-])?(readonly)\\s*)?\\s*(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s+(in)\\s+",
1610
"beginCaptures": {
1611
"1": {
1612
"name": "keyword.operator.type.modifier.js.jsx"
1613
},
1614
"2": {
1615
"name": "storage.modifier.js.jsx"
1616
},
1617
"3": {
1618
"name": "meta.brace.square.js.jsx"
1619
},
1620
"4": {
1621
"name": "entity.name.type.js.jsx"
1622
},
1623
"5": {
1624
"name": "keyword.operator.expression.in.js.jsx"
1625
}
1626
},
1627
"end": "(\\])([+-])?\\s*(\\?\\s*)?|$",
1628
"endCaptures": {
1629
"1": {
1630
"name": "meta.brace.square.js.jsx"
1631
},
1632
"2": {
1633
"name": "keyword.operator.type.modifier.js.jsx"
1634
},
1635
"3": {
1636
"name": "keyword.operator.optional.js.jsx"
1637
}
1638
},
1639
"patterns": [
1640
{
1641
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+",
1642
"captures": {
1643
"1": {
1644
"name": "keyword.control.as.js.jsx"
1645
}
1646
}
1647
},
1648
{
1649
"include": "#type"
1650
}
1651
]
1652
},
1653
"function-parameters": {
1654
"name": "meta.parameters.js.jsx",
1655
"begin": "\\(",
1656
"beginCaptures": {
1657
"0": {
1658
"name": "punctuation.definition.parameters.begin.js.jsx"
1659
}
1660
},
1661
"end": "\\)",
1662
"endCaptures": {
1663
"0": {
1664
"name": "punctuation.definition.parameters.end.js.jsx"
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.jsx",
1698
"match": ","
1699
}
1700
]
1701
},
1702
"class-declaration": {
1703
"name": "meta.class.js.jsx",
1704
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(?:(abstract)\\s+)?\\b(class)\\b(?=\\s+|/[/*])",
1705
"beginCaptures": {
1706
"1": {
1707
"name": "keyword.control.export.js.jsx"
1708
},
1709
"2": {
1710
"name": "storage.modifier.js.jsx"
1711
},
1712
"3": {
1713
"name": "storage.modifier.js.jsx"
1714
},
1715
"4": {
1716
"name": "storage.type.class.js.jsx"
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.jsx",
1728
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(class)\\b(?=\\s+|[<{]|\\/[\\/*])",
1729
"beginCaptures": {
1730
"1": {
1731
"name": "storage.modifier.js.jsx"
1732
},
1733
"2": {
1734
"name": "storage.type.class.js.jsx"
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.jsx"
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.jsx",
1770
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(?:(abstract)\\s+)?\\b(interface)\\b(?=\\s+|/[/*])",
1771
"beginCaptures": {
1772
"1": {
1773
"name": "keyword.control.export.js.jsx"
1774
},
1775
"2": {
1776
"name": "storage.modifier.js.jsx"
1777
},
1778
"3": {
1779
"name": "storage.modifier.js.jsx"
1780
},
1781
"4": {
1782
"name": "storage.type.interface.js.jsx"
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.jsx"
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.jsx"
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.jsx"
1835
},
1836
"2": {
1837
"name": "punctuation.accessor.js.jsx"
1838
},
1839
"3": {
1840
"name": "punctuation.accessor.optional.js.jsx"
1841
}
1842
}
1843
},
1844
{
1845
"match": "([_$[:alpha:]][_$[:alnum:]]*)",
1846
"captures": {
1847
"1": {
1848
"name": "entity.other.inherited-class.js.jsx"
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.jsx"
1862
}
1863
},
1864
"end": "\\}",
1865
"endCaptures": {
1866
"0": {
1867
"name": "punctuation.definition.block.js.jsx"
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.jsx",
1932
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|declare|override|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1933
},
1934
"property-accessor": {
1935
"name": "storage.type.property.js.jsx",
1936
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(accessor|get|set)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1937
},
1938
"async-modifier": {
1939
"name": "storage.modifier.async.js.jsx",
1940
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(async)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1941
},
1942
"enum-declaration": {
1943
"name": "meta.enum.declaration.js.jsx",
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.jsx"
1948
},
1949
"2": {
1950
"name": "storage.modifier.js.jsx"
1951
},
1952
"3": {
1953
"name": "storage.modifier.js.jsx"
1954
},
1955
"4": {
1956
"name": "storage.type.enum.js.jsx"
1957
},
1958
"5": {
1959
"name": "entity.name.type.enum.js.jsx"
1960
}
1961
},
1962
"end": "(?<=\\})",
1963
"patterns": [
1964
{
1965
"include": "#comment"
1966
},
1967
{
1968
"begin": "\\{",
1969
"beginCaptures": {
1970
"0": {
1971
"name": "punctuation.definition.block.js.jsx"
1972
}
1973
},
1974
"end": "\\}",
1975
"endCaptures": {
1976
"0": {
1977
"name": "punctuation.definition.block.js.jsx"
1978
}
1979
},
1980
"patterns": [
1981
{
1982
"include": "#comment"
1983
},
1984
{
1985
"begin": "([_$[:alpha:]][_$[:alnum:]]*)",
1986
"beginCaptures": {
1987
"0": {
1988
"name": "variable.other.enummember.js.jsx"
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.jsx",
2028
"begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(namespace|module)\\s+(?=[_$[:alpha:]\"'`]))",
2029
"beginCaptures": {
2030
"1": {
2031
"name": "keyword.control.export.js.jsx"
2032
},
2033
"2": {
2034
"name": "storage.modifier.js.jsx"
2035
},
2036
"3": {
2037
"name": "storage.type.namespace.js.jsx"
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.jsx",
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.jsx",
2062
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*",
2063
"beginCaptures": {
2064
"1": {
2065
"name": "keyword.control.export.js.jsx"
2066
},
2067
"2": {
2068
"name": "storage.modifier.js.jsx"
2069
},
2070
"3": {
2071
"name": "storage.type.type.js.jsx"
2072
},
2073
"4": {
2074
"name": "entity.name.type.alias.js.jsx"
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.jsx"
2090
},
2091
"2": {
2092
"name": "keyword.control.intrinsic.js.jsx"
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.jsx"
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.jsx",
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.jsx"
2126
},
2127
"2": {
2128
"name": "storage.modifier.js.jsx"
2129
},
2130
"3": {
2131
"name": "keyword.control.import.js.jsx"
2132
},
2133
"4": {
2134
"name": "keyword.control.type.js.jsx"
2135
},
2136
"5": {
2137
"name": "variable.other.readwrite.alias.js.jsx"
2138
},
2139
"6": {
2140
"name": "keyword.operator.assignment.js.jsx"
2141
},
2142
"7": {
2143
"name": "keyword.control.require.js.jsx"
2144
},
2145
"8": {
2146
"name": "meta.brace.round.js.jsx"
2147
}
2148
},
2149
"end": "\\)",
2150
"endCaptures": {
2151
"0": {
2152
"name": "meta.brace.round.js.jsx"
2153
}
2154
},
2155
"patterns": [
2156
{
2157
"include": "#comment"
2158
},
2159
{
2160
"include": "#string"
2161
}
2162
]
2163
},
2164
{
2165
"name": "meta.import-equals.internal.js.jsx",
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.jsx"
2170
},
2171
"2": {
2172
"name": "storage.modifier.js.jsx"
2173
},
2174
"3": {
2175
"name": "keyword.control.import.js.jsx"
2176
},
2177
"4": {
2178
"name": "keyword.control.type.js.jsx"
2179
},
2180
"5": {
2181
"name": "variable.other.readwrite.alias.js.jsx"
2182
},
2183
"6": {
2184
"name": "keyword.operator.assignment.js.jsx"
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.jsx"
2200
},
2201
"2": {
2202
"name": "punctuation.accessor.js.jsx"
2203
},
2204
"3": {
2205
"name": "punctuation.accessor.optional.js.jsx"
2206
}
2207
}
2208
},
2209
{
2210
"name": "variable.other.readwrite.js.jsx",
2211
"match": "([_$[:alpha:]][_$[:alnum:]]*)"
2212
}
2213
]
2214
}
2215
]
2216
},
2217
"import-declaration": {
2218
"name": "meta.import.js.jsx",
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.jsx"
2223
},
2224
"2": {
2225
"name": "storage.modifier.js.jsx"
2226
},
2227
"3": {
2228
"name": "keyword.control.import.js.jsx"
2229
},
2230
"4": {
2231
"name": "keyword.control.type.js.jsx"
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.jsx"
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.jsx"
2271
},
2272
"2": {
2273
"name": "keyword.control.as.js.jsx"
2274
},
2275
"3": {
2276
"name": "storage.type.namespace.js.jsx"
2277
},
2278
"4": {
2279
"name": "entity.name.type.module.js.jsx"
2280
}
2281
}
2282
},
2283
{
2284
"name": "meta.export.default.js.jsx",
2285
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))",
2286
"beginCaptures": {
2287
"1": {
2288
"name": "keyword.control.export.js.jsx"
2289
},
2290
"2": {
2291
"name": "keyword.control.type.js.jsx"
2292
},
2293
"3": {
2294
"name": "keyword.operator.assignment.js.jsx"
2295
},
2296
"4": {
2297
"name": "keyword.control.default.js.jsx"
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.jsx",
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.jsx"
2316
},
2317
"2": {
2318
"name": "keyword.control.type.js.jsx"
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.jsx",
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:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(with)|(assert))\\s*(\\{)",
2355
"beginCaptures": {
2356
"1": {
2357
"name": "keyword.control.with.js.jsx"
2358
},
2359
"2": {
2360
"name": "keyword.control.assert.js.jsx"
2361
},
2362
"3": {
2363
"name": "punctuation.definition.block.js.jsx"
2364
}
2365
},
2366
"end": "\\}",
2367
"endCaptures": {
2368
"0": {
2369
"name": "punctuation.definition.block.js.jsx"
2370
}
2371
},
2372
"patterns": [
2373
{
2374
"include": "#comment"
2375
},
2376
{
2377
"include": "#string"
2378
},
2379
{
2380
"name": "meta.object-literal.key.js.jsx",
2381
"match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)"
2382
},
2383
{
2384
"name": "punctuation.separator.key-value.js.jsx",
2385
"match": ":"
2386
}
2387
]
2388
},
2389
"import-export-block": {
2390
"name": "meta.block.js.jsx",
2391
"begin": "\\{",
2392
"beginCaptures": {
2393
"0": {
2394
"name": "punctuation.definition.block.js.jsx"
2395
}
2396
},
2397
"end": "\\}",
2398
"endCaptures": {
2399
"0": {
2400
"name": "punctuation.definition.block.js.jsx"
2401
}
2402
},
2403
"patterns": [
2404
{
2405
"include": "#import-export-clause"
2406
}
2407
]
2408
},
2409
"import-export-clause": {
2410
"patterns": [
2411
{
2412
"include": "#comment"
2413
},
2414
{
2415
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(?:(\\btype)\\s+)?(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*)|((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))))\\s+(as)\\s+(?:(default(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|([_$[:alpha:]][_$[:alnum:]]*)|((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))",
2416
"captures": {
2417
"1": {
2418
"name": "keyword.control.type.js.jsx"
2419
},
2420
"2": {
2421
"name": "keyword.control.default.js.jsx"
2422
},
2423
"3": {
2424
"name": "constant.language.import-export-all.js.jsx"
2425
},
2426
"4": {
2427
"name": "variable.other.readwrite.js.jsx"
2428
},
2429
"5": {
2430
"name": "string.quoted.alias.js.jsx"
2431
},
2432
"12": {
2433
"name": "keyword.control.as.js.jsx"
2434
},
2435
"13": {
2436
"name": "keyword.control.default.js.jsx"
2437
},
2438
"14": {
2439
"name": "variable.other.readwrite.alias.js.jsx"
2440
},
2441
"15": {
2442
"name": "string.quoted.alias.js.jsx"
2443
}
2444
}
2445
},
2446
{
2447
"include": "#punctuation-comma"
2448
},
2449
{
2450
"name": "constant.language.import-export-all.js.jsx",
2451
"match": "\\*"
2452
},
2453
{
2454
"name": "keyword.control.default.js.jsx",
2455
"match": "\\b(default)\\b"
2456
},
2457
{
2458
"match": "(?:(\\btype)\\s+)?(?:([_$[:alpha:]][_$[:alnum:]]*)|((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))",
2459
"captures": {
2460
"1": {
2461
"name": "keyword.control.type.js.jsx"
2462
},
2463
"2": {
2464
"name": "variable.other.readwrite.alias.js.jsx"
2465
},
2466
"3": {
2467
"name": "string.quoted.alias.js.jsx"
2468
}
2469
}
2470
}
2471
]
2472
},
2473
"switch-statement": {
2474
"name": "switch-statement.expr.js.jsx",
2475
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bswitch\\s*\\()",
2476
"end": "\\}",
2477
"endCaptures": {
2478
"0": {
2479
"name": "punctuation.definition.block.js.jsx"
2480
}
2481
},
2482
"patterns": [
2483
{
2484
"include": "#comment"
2485
},
2486
{
2487
"name": "switch-expression.expr.js.jsx",
2488
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(switch)\\s*(\\()",
2489
"beginCaptures": {
2490
"1": {
2491
"name": "keyword.control.switch.js.jsx"
2492
},
2493
"2": {
2494
"name": "meta.brace.round.js.jsx"
2495
}
2496
},
2497
"end": "\\)",
2498
"endCaptures": {
2499
"0": {
2500
"name": "meta.brace.round.js.jsx"
2501
}
2502
},
2503
"patterns": [
2504
{
2505
"include": "#expression"
2506
}
2507
]
2508
},
2509
{
2510
"name": "switch-block.expr.js.jsx",
2511
"begin": "\\{",
2512
"beginCaptures": {
2513
"0": {
2514
"name": "punctuation.definition.block.js.jsx"
2515
}
2516
},
2517
"end": "(?=\\})",
2518
"patterns": [
2519
{
2520
"name": "case-clause.expr.js.jsx",
2521
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default(?=:))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2522
"beginCaptures": {
2523
"1": {
2524
"name": "keyword.control.switch.js.jsx"
2525
}
2526
},
2527
"end": "(?=:)",
2528
"patterns": [
2529
{
2530
"include": "#expression"
2531
}
2532
]
2533
},
2534
{
2535
"begin": "(:)\\s*(\\{)",
2536
"beginCaptures": {
2537
"1": {
2538
"name": "case-clause.expr.js.jsx punctuation.definition.section.case-statement.js.jsx"
2539
},
2540
"2": {
2541
"name": "meta.block.js.jsx punctuation.definition.block.js.jsx"
2542
}
2543
},
2544
"end": "\\}",
2545
"endCaptures": {
2546
"0": {
2547
"name": "meta.block.js.jsx punctuation.definition.block.js.jsx"
2548
}
2549
},
2550
"contentName": "meta.block.js.jsx",
2551
"patterns": [
2552
{
2553
"include": "#statements"
2554
}
2555
]
2556
},
2557
{
2558
"match": "(:)",
2559
"captures": {
2560
"0": {
2561
"name": "case-clause.expr.js.jsx punctuation.definition.section.case-statement.js.jsx"
2562
}
2563
}
2564
},
2565
{
2566
"include": "#statements"
2567
}
2568
]
2569
}
2570
]
2571
},
2572
"for-loop": {
2573
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))for(?=((\\s+|(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*))await)?\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)?(\\())",
2574
"beginCaptures": {
2575
"0": {
2576
"name": "keyword.control.loop.js.jsx"
2577
}
2578
},
2579
"end": "(?<=\\))",
2580
"patterns": [
2581
{
2582
"include": "#comment"
2583
},
2584
{
2585
"name": "keyword.control.loop.js.jsx",
2586
"match": "await"
2587
},
2588
{
2589
"begin": "\\(",
2590
"beginCaptures": {
2591
"0": {
2592
"name": "meta.brace.round.js.jsx"
2593
}
2594
},
2595
"end": "\\)",
2596
"endCaptures": {
2597
"0": {
2598
"name": "meta.brace.round.js.jsx"
2599
}
2600
},
2601
"patterns": [
2602
{
2603
"include": "#var-expr"
2604
},
2605
{
2606
"include": "#expression"
2607
},
2608
{
2609
"include": "#punctuation-semicolon"
2610
}
2611
]
2612
}
2613
]
2614
},
2615
"if-statement": {
2616
"patterns": [
2617
{
2618
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bif\\s*(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))\\s*(?!\\{))",
2619
"end": "(?=;|$|\\})",
2620
"patterns": [
2621
{
2622
"include": "#comment"
2623
},
2624
{
2625
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(if)\\s*(\\()",
2626
"beginCaptures": {
2627
"1": {
2628
"name": "keyword.control.conditional.js.jsx"
2629
},
2630
"2": {
2631
"name": "meta.brace.round.js.jsx"
2632
}
2633
},
2634
"end": "\\)",
2635
"endCaptures": {
2636
"0": {
2637
"name": "meta.brace.round.js.jsx"
2638
}
2639
},
2640
"patterns": [
2641
{
2642
"include": "#expression"
2643
}
2644
]
2645
},
2646
{
2647
"name": "string.regexp.js.jsx",
2648
"begin": "(?<=\\))\\s*\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuvy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
2649
"beginCaptures": {
2650
"0": {
2651
"name": "punctuation.definition.string.begin.js.jsx"
2652
}
2653
},
2654
"end": "(/)([dgimsuvy]*)",
2655
"endCaptures": {
2656
"1": {
2657
"name": "punctuation.definition.string.end.js.jsx"
2658
},
2659
"2": {
2660
"name": "keyword.other.js.jsx"
2661
}
2662
},
2663
"patterns": [
2664
{
2665
"include": "#regexp"
2666
}
2667
]
2668
},
2669
{
2670
"include": "#statements"
2671
}
2672
]
2673
}
2674
]
2675
},
2676
"decl-block": {
2677
"name": "meta.block.js.jsx",
2678
"begin": "\\{",
2679
"beginCaptures": {
2680
"0": {
2681
"name": "punctuation.definition.block.js.jsx"
2682
}
2683
},
2684
"end": "\\}",
2685
"endCaptures": {
2686
"0": {
2687
"name": "punctuation.definition.block.js.jsx"
2688
}
2689
},
2690
"patterns": [
2691
{
2692
"include": "#statements"
2693
}
2694
]
2695
},
2696
"after-operator-block-as-object-literal": {
2697
"name": "meta.objectliteral.js.jsx",
2698
"begin": "(?<!\\+\\+|--)(?<=[:=(,\\[?+!>]|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^yield|[^\\._$[:alnum:]]yield|^throw|[^\\._$[:alnum:]]throw|^in|[^\\._$[:alnum:]]in|^of|[^\\._$[:alnum:]]of|^typeof|[^\\._$[:alnum:]]typeof|&&|\\|\\||\\*)\\s*(\\{)",
2699
"beginCaptures": {
2700
"1": {
2701
"name": "punctuation.definition.block.js.jsx"
2702
}
2703
},
2704
"end": "\\}",
2705
"endCaptures": {
2706
"0": {
2707
"name": "punctuation.definition.block.js.jsx"
2708
}
2709
},
2710
"patterns": [
2711
{
2712
"include": "#object-member"
2713
}
2714
]
2715
},
2716
"object-literal": {
2717
"name": "meta.objectliteral.js.jsx",
2718
"begin": "\\{",
2719
"beginCaptures": {
2720
"0": {
2721
"name": "punctuation.definition.block.js.jsx"
2722
}
2723
},
2724
"end": "\\}",
2725
"endCaptures": {
2726
"0": {
2727
"name": "punctuation.definition.block.js.jsx"
2728
}
2729
},
2730
"patterns": [
2731
{
2732
"include": "#object-member"
2733
}
2734
]
2735
},
2736
"object-member": {
2737
"patterns": [
2738
{
2739
"include": "#comment"
2740
},
2741
{
2742
"include": "#object-literal-method-declaration"
2743
},
2744
{
2745
"name": "meta.object.member.js.jsx meta.object-literal.key.js.jsx",
2746
"begin": "(?=\\[)",
2747
"end": "(?=:)|((?<=[\\]])(?=\\s*[\\(\\<]))",
2748
"patterns": [
2749
{
2750
"include": "#comment"
2751
},
2752
{
2753
"include": "#array-literal"
2754
}
2755
]
2756
},
2757
{
2758
"name": "meta.object.member.js.jsx meta.object-literal.key.js.jsx",
2759
"begin": "(?=[\\'\\\"\\`])",
2760
"end": "(?=:)|((?<=[\\'\\\"\\`])(?=((\\s*[\\(\\<,}])|(\\s+(as|satisifies)\\s+))))",
2761
"patterns": [
2762
{
2763
"include": "#comment"
2764
},
2765
{
2766
"include": "#string"
2767
}
2768
]
2769
},
2770
{
2771
"name": "meta.object.member.js.jsx meta.object-literal.key.js.jsx",
2772
"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)(?!\\$)))",
2773
"end": "(?=:)|(?=\\s*([\\(\\<,}])|(\\s+as|satisifies\\s+))",
2774
"patterns": [
2775
{
2776
"include": "#comment"
2777
},
2778
{
2779
"include": "#numeric-literal"
2780
}
2781
]
2782
},
2783
{
2784
"name": "meta.method.declaration.js.jsx",
2785
"begin": "(?<=[\\]\\'\\\"\\`])(?=\\s*[\\(\\<])",
2786
"end": "(?=\\}|;|,)|(?<=\\})",
2787
"patterns": [
2788
{
2789
"include": "#function-body"
2790
}
2791
]
2792
},
2793
{
2794
"name": "meta.object.member.js.jsx",
2795
"match": "(?![_$[:alpha:]])([[:digit:]]+)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)",
2796
"captures": {
2797
"0": {
2798
"name": "meta.object-literal.key.js.jsx"
2799
},
2800
"1": {
2801
"name": "constant.numeric.decimal.js.jsx"
2802
}
2803
}
2804
},
2805
{
2806
"name": "meta.object.member.js.jsx",
2807
"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)))",
2808
"captures": {
2809
"0": {
2810
"name": "meta.object-literal.key.js.jsx"
2811
},
2812
"1": {
2813
"name": "entity.name.function.js.jsx"
2814
}
2815
}
2816
},
2817
{
2818
"name": "meta.object.member.js.jsx",
2819
"match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)",
2820
"captures": {
2821
"0": {
2822
"name": "meta.object-literal.key.js.jsx"
2823
}
2824
}
2825
},
2826
{
2827
"name": "meta.object.member.js.jsx",
2828
"begin": "\\.\\.\\.",
2829
"beginCaptures": {
2830
"0": {
2831
"name": "keyword.operator.spread.js.jsx"
2832
}
2833
},
2834
"end": "(?=,|\\})",
2835
"patterns": [
2836
{
2837
"include": "#expression"
2838
}
2839
]
2840
},
2841
{
2842
"name": "meta.object.member.js.jsx",
2843
"match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$|\\/\\/|\\/\\*)",
2844
"captures": {
2845
"1": {
2846
"name": "variable.other.readwrite.js.jsx"
2847
}
2848
}
2849
},
2850
{
2851
"name": "meta.object.member.js.jsx",
2852
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*([,}]|$))",
2853
"captures": {
2854
"1": {
2855
"name": "keyword.control.as.js.jsx"
2856
},
2857
"2": {
2858
"name": "storage.modifier.js.jsx"
2859
}
2860
}
2861
},
2862
{
2863
"name": "meta.object.member.js.jsx",
2864
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(as)|(satisfies))\\s+",
2865
"beginCaptures": {
2866
"1": {
2867
"name": "keyword.control.as.js.jsx"
2868
},
2869
"2": {
2870
"name": "keyword.control.satisfies.js.jsx"
2871
}
2872
},
2873
"end": "(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|^|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as|satisifies)\\s+))",
2874
"patterns": [
2875
{
2876
"include": "#type"
2877
}
2878
]
2879
},
2880
{
2881
"name": "meta.object.member.js.jsx",
2882
"begin": "(?=[_$[:alpha:]][_$[:alnum:]]*\\s*=)",
2883
"end": "(?=,|\\}|$|\\/\\/|\\/\\*)",
2884
"patterns": [
2885
{
2886
"include": "#expression"
2887
}
2888
]
2889
},
2890
{
2891
"name": "meta.object.member.js.jsx",
2892
"begin": ":",
2893
"beginCaptures": {
2894
"0": {
2895
"name": "meta.object-literal.key.js.jsx punctuation.separator.key-value.js.jsx"
2896
}
2897
},
2898
"end": "(?=,|\\})",
2899
"patterns": [
2900
{
2901
"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*)))))",
2902
"beginCaptures": {
2903
"1": {
2904
"name": "storage.modifier.async.js.jsx"
2905
}
2906
},
2907
"end": "(?<=\\))",
2908
"patterns": [
2909
{
2910
"include": "#type-parameters"
2911
},
2912
{
2913
"begin": "\\(",
2914
"beginCaptures": {
2915
"0": {
2916
"name": "meta.brace.round.js.jsx"
2917
}
2918
},
2919
"end": "\\)",
2920
"endCaptures": {
2921
"0": {
2922
"name": "meta.brace.round.js.jsx"
2923
}
2924
},
2925
"patterns": [
2926
{
2927
"include": "#expression-inside-possibly-arrow-parens"
2928
}
2929
]
2930
}
2931
]
2932
},
2933
{
2934
"begin": "(?<=:)\\s*(async)?\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2935
"beginCaptures": {
2936
"1": {
2937
"name": "storage.modifier.async.js.jsx"
2938
},
2939
"2": {
2940
"name": "meta.brace.round.js.jsx"
2941
}
2942
},
2943
"end": "\\)",
2944
"endCaptures": {
2945
"0": {
2946
"name": "meta.brace.round.js.jsx"
2947
}
2948
},
2949
"patterns": [
2950
{
2951
"include": "#expression-inside-possibly-arrow-parens"
2952
}
2953
]
2954
},
2955
{
2956
"begin": "(?<=:)\\s*(async)?\\s*(?=\\<\\s*$)",
2957
"beginCaptures": {
2958
"1": {
2959
"name": "storage.modifier.async.js.jsx"
2960
}
2961
},
2962
"end": "(?<=\\>)",
2963
"patterns": [
2964
{
2965
"include": "#type-parameters"
2966
}
2967
]
2968
},
2969
{
2970
"begin": "(?<=\\>)\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2971
"beginCaptures": {
2972
"1": {
2973
"name": "meta.brace.round.js.jsx"
2974
}
2975
},
2976
"end": "\\)",
2977
"endCaptures": {
2978
"0": {
2979
"name": "meta.brace.round.js.jsx"
2980
}
2981
},
2982
"patterns": [
2983
{
2984
"include": "#expression-inside-possibly-arrow-parens"
2985
}
2986
]
2987
},
2988
{
2989
"include": "#possibly-arrow-return-type"
2990
},
2991
{
2992
"include": "#expression"
2993
}
2994
]
2995
},
2996
{
2997
"include": "#punctuation-comma"
2998
},
2999
{
3000
"include": "#decl-block"
3001
}
3002
]
3003
},
3004
"ternary-expression": {
3005
"begin": "(?!\\?\\.\\s*[^[:digit:]])(\\?)(?!\\?)",
3006
"beginCaptures": {
3007
"1": {
3008
"name": "keyword.operator.ternary.js.jsx"
3009
}
3010
},
3011
"end": "\\s*(:)",
3012
"endCaptures": {
3013
"1": {
3014
"name": "keyword.operator.ternary.js.jsx"
3015
}
3016
},
3017
"patterns": [
3018
{
3019
"include": "#expression"
3020
}
3021
]
3022
},
3023
"function-call": {
3024
"patterns": [
3025
{
3026
"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*)?\\())",
3027
"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*)?\\())",
3028
"patterns": [
3029
{
3030
"name": "meta.function-call.js.jsx",
3031
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))",
3032
"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*)?\\())",
3033
"patterns": [
3034
{
3035
"include": "#function-call-target"
3036
}
3037
]
3038
},
3039
{
3040
"include": "#comment"
3041
},
3042
{
3043
"include": "#function-call-optionals"
3044
},
3045
{
3046
"include": "#type-arguments"
3047
},
3048
{
3049
"include": "#paren-expression"
3050
}
3051
]
3052
},
3053
{
3054
"begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))",
3055
"end": "(?<=\\>)(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))",
3056
"patterns": [
3057
{
3058
"name": "meta.function-call.js.jsx",
3059
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))",
3060
"end": "(?=(<\\s*[\\{\\[\\(]\\s*$))",
3061
"patterns": [
3062
{
3063
"include": "#function-call-target"
3064
}
3065
]
3066
},
3067
{
3068
"include": "#comment"
3069
},
3070
{
3071
"include": "#function-call-optionals"
3072
},
3073
{
3074
"include": "#type-arguments"
3075
}
3076
]
3077
}
3078
]
3079
},
3080
"function-call-target": {
3081
"patterns": [
3082
{
3083
"include": "#support-function-call-identifiers"
3084
},
3085
{
3086
"name": "entity.name.function.js.jsx",
3087
"match": "(\\#?[_$[:alpha:]][_$[:alnum:]]*)"
3088
}
3089
]
3090
},
3091
"function-call-optionals": {
3092
"patterns": [
3093
{
3094
"name": "meta.function-call.js.jsx punctuation.accessor.optional.js.jsx",
3095
"match": "\\?\\."
3096
},
3097
{
3098
"name": "meta.function-call.js.jsx keyword.operator.definiteassignment.js.jsx",
3099
"match": "\\!"
3100
}
3101
]
3102
},
3103
"support-function-call-identifiers": {
3104
"patterns": [
3105
{
3106
"include": "#literal"
3107
},
3108
{
3109
"include": "#support-objects"
3110
},
3111
{
3112
"include": "#object-identifiers"
3113
},
3114
{
3115
"include": "#punctuation-accessor"
3116
},
3117
{
3118
"name": "keyword.operator.expression.import.js.jsx",
3119
"match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*[\\(]\\s*[\\\"\\'\\`]))"
3120
}
3121
]
3122
},
3123
"new-expr": {
3124
"name": "new.expr.js.jsx",
3125
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3126
"beginCaptures": {
3127
"1": {
3128
"name": "keyword.operator.new.js.jsx"
3129
}
3130
},
3131
"end": "(?<=\\))|(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
3132
"patterns": [
3133
{
3134
"include": "#expression"
3135
}
3136
]
3137
},
3138
"instanceof-expr": {
3139
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(instanceof)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3140
"beginCaptures": {
3141
"1": {
3142
"name": "keyword.operator.expression.instanceof.js.jsx"
3143
}
3144
},
3145
"end": "(?<=\\))|(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|(===|!==|==|!=)|(([\\&\\~\\^\\|]\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s+instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
3146
"patterns": [
3147
{
3148
"include": "#type"
3149
}
3150
]
3151
},
3152
"paren-expression-possibly-arrow": {
3153
"patterns": [
3154
{
3155
"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*)))))",
3156
"beginCaptures": {
3157
"1": {
3158
"name": "storage.modifier.async.js.jsx"
3159
}
3160
},
3161
"end": "(?<=\\))",
3162
"patterns": [
3163
{
3164
"include": "#paren-expression-possibly-arrow-with-typeparameters"
3165
}
3166
]
3167
},
3168
{
3169
"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*$)",
3170
"beginCaptures": {
3171
"1": {
3172
"name": "storage.modifier.async.js.jsx"
3173
}
3174
},
3175
"end": "(?<=\\))",
3176
"patterns": [
3177
{
3178
"include": "#paren-expression-possibly-arrow-with-typeparameters"
3179
}
3180
]
3181
},
3182
{
3183
"include": "#possibly-arrow-return-type"
3184
}
3185
]
3186
},
3187
"paren-expression-possibly-arrow-with-typeparameters": {
3188
"patterns": [
3189
{
3190
"include": "#type-parameters"
3191
},
3192
{
3193
"begin": "\\(",
3194
"beginCaptures": {
3195
"0": {
3196
"name": "meta.brace.round.js.jsx"
3197
}
3198
},
3199
"end": "\\)",
3200
"endCaptures": {
3201
"0": {
3202
"name": "meta.brace.round.js.jsx"
3203
}
3204
},
3205
"patterns": [
3206
{
3207
"include": "#expression-inside-possibly-arrow-parens"
3208
}
3209
]
3210
}
3211
]
3212
},
3213
"expression-inside-possibly-arrow-parens": {
3214
"patterns": [
3215
{
3216
"include": "#expressionWithoutIdentifiers"
3217
},
3218
{
3219
"include": "#comment"
3220
},
3221
{
3222
"include": "#string"
3223
},
3224
{
3225
"include": "#decorator"
3226
},
3227
{
3228
"include": "#destructuring-parameter"
3229
},
3230
{
3231
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)",
3232
"captures": {
3233
"1": {
3234
"name": "storage.modifier.js.jsx"
3235
}
3236
}
3237
},
3238
{
3239
"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)))",
3240
"captures": {
3241
"1": {
3242
"name": "storage.modifier.js.jsx"
3243
},
3244
"2": {
3245
"name": "keyword.operator.rest.js.jsx"
3246
},
3247
"3": {
3248
"name": "entity.name.function.js.jsx variable.language.this.js.jsx"
3249
},
3250
"4": {
3251
"name": "entity.name.function.js.jsx"
3252
},
3253
"5": {
3254
"name": "keyword.operator.optional.js.jsx"
3255
}
3256
}
3257
},
3258
{
3259
"match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*[:,]|$)",
3260
"captures": {
3261
"1": {
3262
"name": "storage.modifier.js.jsx"
3263
},
3264
"2": {
3265
"name": "keyword.operator.rest.js.jsx"
3266
},
3267
"3": {
3268
"name": "variable.parameter.js.jsx variable.language.this.js.jsx"
3269
},
3270
"4": {
3271
"name": "variable.parameter.js.jsx"
3272
},
3273
"5": {
3274
"name": "keyword.operator.optional.js.jsx"
3275
}
3276
}
3277
},
3278
{
3279
"include": "#type-annotation"
3280
},
3281
{
3282
"include": "#variable-initializer"
3283
},
3284
{
3285
"name": "punctuation.separator.parameter.js.jsx",
3286
"match": ","
3287
},
3288
{
3289
"include": "#identifiers"
3290
},
3291
{
3292
"include": "#expressionPunctuations"
3293
}
3294
]
3295
},
3296
"paren-expression": {
3297
"begin": "\\(",
3298
"beginCaptures": {
3299
"0": {
3300
"name": "meta.brace.round.js.jsx"
3301
}
3302
},
3303
"end": "\\)",
3304
"endCaptures": {
3305
"0": {
3306
"name": "meta.brace.round.js.jsx"
3307
}
3308
},
3309
"patterns": [
3310
{
3311
"include": "#expression"
3312
}
3313
]
3314
},
3315
"cast": {
3316
"patterns": [
3317
{
3318
"include": "#jsx"
3319
}
3320
]
3321
},
3322
"expression-operators": {
3323
"patterns": [
3324
{
3325
"name": "keyword.control.flow.js.jsx",
3326
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(await)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3327
},
3328
{
3329
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?=\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*\\*)",
3330
"beginCaptures": {
3331
"1": {
3332
"name": "keyword.control.flow.js.jsx"
3333
}
3334
},
3335
"end": "\\*",
3336
"endCaptures": {
3337
"0": {
3338
"name": "keyword.generator.asterisk.js.jsx"
3339
}
3340
},
3341
"patterns": [
3342
{
3343
"include": "#comment"
3344
}
3345
]
3346
},
3347
{
3348
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s*(\\*))?",
3349
"captures": {
3350
"1": {
3351
"name": "keyword.control.flow.js.jsx"
3352
},
3353
"2": {
3354
"name": "keyword.generator.asterisk.js.jsx"
3355
}
3356
}
3357
},
3358
{
3359
"name": "keyword.operator.expression.delete.js.jsx",
3360
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))delete(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3361
},
3362
{
3363
"name": "keyword.operator.expression.in.js.jsx",
3364
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))in(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()"
3365
},
3366
{
3367
"name": "keyword.operator.expression.of.js.jsx",
3368
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))of(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()"
3369
},
3370
{
3371
"name": "keyword.operator.expression.instanceof.js.jsx",
3372
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3373
},
3374
{
3375
"name": "keyword.operator.new.js.jsx",
3376
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3377
},
3378
{
3379
"include": "#typeof-operator"
3380
},
3381
{
3382
"name": "keyword.operator.expression.void.js.jsx",
3383
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))void(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3384
},
3385
{
3386
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*($|[;,:})\\]]))",
3387
"captures": {
3388
"1": {
3389
"name": "keyword.control.as.js.jsx"
3390
},
3391
"2": {
3392
"name": "storage.modifier.js.jsx"
3393
}
3394
}
3395
},
3396
{
3397
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(as)|(satisfies))\\s+",
3398
"beginCaptures": {
3399
"1": {
3400
"name": "keyword.control.as.js.jsx"
3401
},
3402
"2": {
3403
"name": "keyword.control.satisfies.js.jsx"
3404
}
3405
},
3406
"end": "(?=^|[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as|satisfies)\\s+)|(\\s+\\<))",
3407
"patterns": [
3408
{
3409
"include": "#type"
3410
}
3411
]
3412
},
3413
{
3414
"name": "keyword.operator.spread.js.jsx",
3415
"match": "\\.\\.\\."
3416
},
3417
{
3418
"name": "keyword.operator.assignment.compound.js.jsx",
3419
"match": "\\*=|(?<!\\()/=|%=|\\+=|\\-="
3420
},
3421
{
3422
"name": "keyword.operator.assignment.compound.bitwise.js.jsx",
3423
"match": "\\&=|\\^=|<<=|>>=|>>>=|\\|="
3424
},
3425
{
3426
"name": "keyword.operator.bitwise.shift.js.jsx",
3427
"match": "<<|>>>|>>"
3428
},
3429
{
3430
"name": "keyword.operator.comparison.js.jsx",
3431
"match": "===|!==|==|!="
3432
},
3433
{
3434
"name": "keyword.operator.relational.js.jsx",
3435
"match": "<=|>=|<>|<|>"
3436
},
3437
{
3438
"match": "(?<=[_$[:alnum:]])(\\!)\\s*(?:(/=)|(?:(/)(?![/*])))",
3439
"captures": {
3440
"1": {
3441
"name": "keyword.operator.logical.js.jsx"
3442
},
3443
"2": {
3444
"name": "keyword.operator.assignment.compound.js.jsx"
3445
},
3446
"3": {
3447
"name": "keyword.operator.arithmetic.js.jsx"
3448
}
3449
}
3450
},
3451
{
3452
"name": "keyword.operator.logical.js.jsx",
3453
"match": "\\!|&&|\\|\\||\\?\\?"
3454
},
3455
{
3456
"name": "keyword.operator.bitwise.js.jsx",
3457
"match": "\\&|~|\\^|\\|"
3458
},
3459
{
3460
"name": "keyword.operator.assignment.js.jsx",
3461
"match": "\\="
3462
},
3463
{
3464
"name": "keyword.operator.decrement.js.jsx",
3465
"match": "--"
3466
},
3467
{
3468
"name": "keyword.operator.increment.js.jsx",
3469
"match": "\\+\\+"
3470
},
3471
{
3472
"name": "keyword.operator.arithmetic.js.jsx",
3473
"match": "%|\\*|/|-|\\+"
3474
},
3475
{
3476
"begin": "(?<=[_$[:alnum:])\\]])\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)+(?:(/=)|(?:(/)(?![/*]))))",
3477
"end": "(?:(/=)|(?:(/)(?!\\*([^\\*]|(\\*[^\\/]))*\\*\\/)))",
3478
"endCaptures": {
3479
"1": {
3480
"name": "keyword.operator.assignment.compound.js.jsx"
3481
},
3482
"2": {
3483
"name": "keyword.operator.arithmetic.js.jsx"
3484
}
3485
},
3486
"patterns": [
3487
{
3488
"include": "#comment"
3489
}
3490
]
3491
},
3492
{
3493
"match": "(?<=[_$[:alnum:])\\]])\\s*(?:(/=)|(?:(/)(?![/*])))",
3494
"captures": {
3495
"1": {
3496
"name": "keyword.operator.assignment.compound.js.jsx"
3497
},
3498
"2": {
3499
"name": "keyword.operator.arithmetic.js.jsx"
3500
}
3501
}
3502
}
3503
]
3504
},
3505
"typeof-operator": {
3506
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))typeof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3507
"beginCaptures": {
3508
"0": {
3509
"name": "keyword.operator.expression.typeof.js.jsx"
3510
}
3511
},
3512
"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))",
3513
"patterns": [
3514
{
3515
"include": "#type-arguments"
3516
},
3517
{
3518
"include": "#expression"
3519
}
3520
]
3521
},
3522
"literal": {
3523
"patterns": [
3524
{
3525
"include": "#numeric-literal"
3526
},
3527
{
3528
"include": "#boolean-literal"
3529
},
3530
{
3531
"include": "#null-literal"
3532
},
3533
{
3534
"include": "#undefined-literal"
3535
},
3536
{
3537
"include": "#numericConstant-literal"
3538
},
3539
{
3540
"include": "#array-literal"
3541
},
3542
{
3543
"include": "#this-literal"
3544
},
3545
{
3546
"include": "#super-literal"
3547
}
3548
]
3549
},
3550
"array-literal": {
3551
"name": "meta.array.literal.js.jsx",
3552
"begin": "\\s*(\\[)",
3553
"beginCaptures": {
3554
"1": {
3555
"name": "meta.brace.square.js.jsx"
3556
}
3557
},
3558
"end": "\\]",
3559
"endCaptures": {
3560
"0": {
3561
"name": "meta.brace.square.js.jsx"
3562
}
3563
},
3564
"patterns": [
3565
{
3566
"include": "#expression"
3567
},
3568
{
3569
"include": "#punctuation-comma"
3570
}
3571
]
3572
},
3573
"numeric-literal": {
3574
"patterns": [
3575
{
3576
"name": "constant.numeric.hex.js.jsx",
3577
"match": "\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$)",
3578
"captures": {
3579
"1": {
3580
"name": "storage.type.numeric.bigint.js.jsx"
3581
}
3582
}
3583
},
3584
{
3585
"name": "constant.numeric.binary.js.jsx",
3586
"match": "\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$)",
3587
"captures": {
3588
"1": {
3589
"name": "storage.type.numeric.bigint.js.jsx"
3590
}
3591
}
3592
},
3593
{
3594
"name": "constant.numeric.octal.js.jsx",
3595
"match": "\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$)",
3596
"captures": {
3597
"1": {
3598
"name": "storage.type.numeric.bigint.js.jsx"
3599
}
3600
}
3601
},
3602
{
3603
"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)(?!\\$)",
3604
"captures": {
3605
"0": {
3606
"name": "constant.numeric.decimal.js.jsx"
3607
},
3608
"1": {
3609
"name": "meta.delimiter.decimal.period.js.jsx"
3610
},
3611
"2": {
3612
"name": "storage.type.numeric.bigint.js.jsx"
3613
},
3614
"3": {
3615
"name": "meta.delimiter.decimal.period.js.jsx"
3616
},
3617
"4": {
3618
"name": "storage.type.numeric.bigint.js.jsx"
3619
},
3620
"5": {
3621
"name": "meta.delimiter.decimal.period.js.jsx"
3622
},
3623
"6": {
3624
"name": "storage.type.numeric.bigint.js.jsx"
3625
},
3626
"7": {
3627
"name": "storage.type.numeric.bigint.js.jsx"
3628
},
3629
"8": {
3630
"name": "meta.delimiter.decimal.period.js.jsx"
3631
},
3632
"9": {
3633
"name": "storage.type.numeric.bigint.js.jsx"
3634
},
3635
"10": {
3636
"name": "meta.delimiter.decimal.period.js.jsx"
3637
},
3638
"11": {
3639
"name": "storage.type.numeric.bigint.js.jsx"
3640
},
3641
"12": {
3642
"name": "meta.delimiter.decimal.period.js.jsx"
3643
},
3644
"13": {
3645
"name": "storage.type.numeric.bigint.js.jsx"
3646
},
3647
"14": {
3648
"name": "storage.type.numeric.bigint.js.jsx"
3649
}
3650
}
3651
}
3652
]
3653
},
3654
"boolean-literal": {
3655
"patterns": [
3656
{
3657
"name": "constant.language.boolean.true.js.jsx",
3658
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))true(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3659
},
3660
{
3661
"name": "constant.language.boolean.false.js.jsx",
3662
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))false(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3663
}
3664
]
3665
},
3666
"null-literal": {
3667
"name": "constant.language.null.js.jsx",
3668
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))null(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3669
},
3670
"this-literal": {
3671
"name": "variable.language.this.js.jsx",
3672
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))this\\b(?!\\$)"
3673
},
3674
"super-literal": {
3675
"name": "variable.language.super.js.jsx",
3676
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))super\\b(?!\\$)"
3677
},
3678
"undefined-literal": {
3679
"name": "constant.language.undefined.js.jsx",
3680
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))undefined(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3681
},
3682
"numericConstant-literal": {
3683
"patterns": [
3684
{
3685
"name": "constant.language.nan.js.jsx",
3686
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))NaN(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3687
},
3688
{
3689
"name": "constant.language.infinity.js.jsx",
3690
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Infinity(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3691
}
3692
]
3693
},
3694
"support-objects": {
3695
"patterns": [
3696
{
3697
"name": "variable.language.arguments.js.jsx",
3698
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(arguments)\\b(?!\\$)"
3699
},
3700
{
3701
"name": "support.class.promise.js.jsx",
3702
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Promise)\\b(?!\\$)"
3703
},
3704
{
3705
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(import)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(meta)\\b(?!\\$)",
3706
"captures": {
3707
"1": {
3708
"name": "keyword.control.import.js.jsx"
3709
},
3710
"2": {
3711
"name": "punctuation.accessor.js.jsx"
3712
},
3713
"3": {
3714
"name": "punctuation.accessor.optional.js.jsx"
3715
},
3716
"4": {
3717
"name": "support.variable.property.importmeta.js.jsx"
3718
}
3719
}
3720
},
3721
{
3722
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(target)\\b(?!\\$)",
3723
"captures": {
3724
"1": {
3725
"name": "keyword.operator.new.js.jsx"
3726
},
3727
"2": {
3728
"name": "punctuation.accessor.js.jsx"
3729
},
3730
"3": {
3731
"name": "punctuation.accessor.optional.js.jsx"
3732
},
3733
"4": {
3734
"name": "support.variable.property.target.js.jsx"
3735
}
3736
}
3737
},
3738
{
3739
"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(?!\\$)))",
3740
"captures": {
3741
"1": {
3742
"name": "punctuation.accessor.js.jsx"
3743
},
3744
"2": {
3745
"name": "punctuation.accessor.optional.js.jsx"
3746
},
3747
"3": {
3748
"name": "support.variable.property.js.jsx"
3749
},
3750
"4": {
3751
"name": "support.constant.js.jsx"
3752
}
3753
}
3754
},
3755
{
3756
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(exports)|(module)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)",
3757
"captures": {
3758
"1": {
3759
"name": "support.type.object.module.js.jsx"
3760
},
3761
"2": {
3762
"name": "support.type.object.module.js.jsx"
3763
},
3764
"3": {
3765
"name": "punctuation.accessor.js.jsx"
3766
},
3767
"4": {
3768
"name": "punctuation.accessor.optional.js.jsx"
3769
},
3770
"5": {
3771
"name": "support.type.object.module.js.jsx"
3772
}
3773
}
3774
}
3775
]
3776
},
3777
"identifiers": {
3778
"patterns": [
3779
{
3780
"include": "#object-identifiers"
3781
},
3782
{
3783
"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))",
3784
"captures": {
3785
"1": {
3786
"name": "punctuation.accessor.js.jsx"
3787
},
3788
"2": {
3789
"name": "punctuation.accessor.optional.js.jsx"
3790
},
3791
"3": {
3792
"name": "entity.name.function.js.jsx"
3793
}
3794
}
3795
},
3796
{
3797
"match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
3798
"captures": {
3799
"1": {
3800
"name": "punctuation.accessor.js.jsx"
3801
},
3802
"2": {
3803
"name": "punctuation.accessor.optional.js.jsx"
3804
},
3805
"3": {
3806
"name": "variable.other.constant.property.js.jsx"
3807
}
3808
}
3809
},
3810
{
3811
"match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*)",
3812
"captures": {
3813
"1": {
3814
"name": "punctuation.accessor.js.jsx"
3815
},
3816
"2": {
3817
"name": "punctuation.accessor.optional.js.jsx"
3818
},
3819
"3": {
3820
"name": "variable.other.property.js.jsx"
3821
}
3822
}
3823
},
3824
{
3825
"name": "variable.other.constant.js.jsx",
3826
"match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
3827
},
3828
{
3829
"name": "variable.other.readwrite.js.jsx",
3830
"match": "[_$[:alpha:]][_$[:alnum:]]*"
3831
}
3832
]
3833
},
3834
"object-identifiers": {
3835
"patterns": [
3836
{
3837
"name": "support.class.js.jsx",
3838
"match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\??\\.\\s*prototype\\b(?!\\$))"
3839
},
3840
{
3841
"match": "(?x)(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(?:\n (\\#?[[:upper:]][_$[:digit:][:upper:]]*) |\n (\\#?[_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)",
3842
"captures": {
3843
"1": {
3844
"name": "punctuation.accessor.js.jsx"
3845
},
3846
"2": {
3847
"name": "punctuation.accessor.optional.js.jsx"
3848
},
3849
"3": {
3850
"name": "variable.other.constant.object.property.js.jsx"
3851
},
3852
"4": {
3853
"name": "variable.other.object.property.js.jsx"
3854
}
3855
}
3856
},
3857
{
3858
"match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)",
3859
"captures": {
3860
"1": {
3861
"name": "variable.other.constant.object.js.jsx"
3862
},
3863
"2": {
3864
"name": "variable.other.object.js.jsx"
3865
}
3866
}
3867
}
3868
]
3869
},
3870
"type-annotation": {
3871
"patterns": [
3872
{
3873
"name": "meta.type.annotation.js.jsx",
3874
"begin": "(:)(?=\\s*\\S)",
3875
"beginCaptures": {
3876
"1": {
3877
"name": "keyword.operator.type.annotation.js.jsx"
3878
}
3879
},
3880
"end": "(?<![:|&])(?!\\s*[|&]\\s+)((?=^|[,);\\}\\]]|//)|(?==[^>])|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))",
3881
"patterns": [
3882
{
3883
"include": "#type"
3884
}
3885
]
3886
},
3887
{
3888
"name": "meta.type.annotation.js.jsx",
3889
"begin": "(:)",
3890
"beginCaptures": {
3891
"1": {
3892
"name": "keyword.operator.type.annotation.js.jsx"
3893
}
3894
},
3895
"end": "(?<![:|&])((?=[,);\\}\\]]|\\/\\/)|(?==[^>])|(?=^\\s*$)|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))",
3896
"patterns": [
3897
{
3898
"include": "#type"
3899
}
3900
]
3901
}
3902
]
3903
},
3904
"parameter-type-annotation": {
3905
"patterns": [
3906
{
3907
"name": "meta.type.annotation.js.jsx",
3908
"begin": "(:)",
3909
"beginCaptures": {
3910
"1": {
3911
"name": "keyword.operator.type.annotation.js.jsx"
3912
}
3913
},
3914
"end": "(?=[,)])|(?==[^>])",
3915
"patterns": [
3916
{
3917
"include": "#type"
3918
}
3919
]
3920
}
3921
]
3922
},
3923
"return-type": {
3924
"patterns": [
3925
{
3926
"name": "meta.return.type.js.jsx",
3927
"begin": "(?<=\\))\\s*(:)(?=\\s*\\S)",
3928
"beginCaptures": {
3929
"1": {
3930
"name": "keyword.operator.type.annotation.js.jsx"
3931
}
3932
},
3933
"end": "(?<![:|&])(?=$|^|[{};,]|//)",
3934
"patterns": [
3935
{
3936
"include": "#return-type-core"
3937
}
3938
]
3939
},
3940
{
3941
"name": "meta.return.type.js.jsx",
3942
"begin": "(?<=\\))\\s*(:)",
3943
"beginCaptures": {
3944
"1": {
3945
"name": "keyword.operator.type.annotation.js.jsx"
3946
}
3947
},
3948
"end": "(?<![:|&])((?=[{};,]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
3949
"patterns": [
3950
{
3951
"include": "#return-type-core"
3952
}
3953
]
3954
}
3955
]
3956
},
3957
"return-type-core": {
3958
"patterns": [
3959
{
3960
"include": "#comment"
3961
},
3962
{
3963
"begin": "(?<=[:|&])(?=\\s*\\{)",
3964
"end": "(?<=\\})",
3965
"patterns": [
3966
{
3967
"include": "#type-object"
3968
}
3969
]
3970
},
3971
{
3972
"include": "#type-predicate-operator"
3973
},
3974
{
3975
"include": "#type"
3976
}
3977
]
3978
},
3979
"arrow-return-type": {
3980
"name": "meta.return.type.arrow.js.jsx",
3981
"begin": "(?<=\\))\\s*(:)",
3982
"beginCaptures": {
3983
"1": {
3984
"name": "keyword.operator.type.annotation.js.jsx"
3985
}
3986
},
3987
"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+))",
3988
"patterns": [
3989
{
3990
"include": "#arrow-return-type-body"
3991
}
3992
]
3993
},
3994
"possibly-arrow-return-type": {
3995
"begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*=>)",
3996
"beginCaptures": {
3997
"1": {
3998
"name": "meta.arrow.js.jsx meta.return.type.arrow.js.jsx keyword.operator.type.annotation.js.jsx"
3999
}
4000
},
4001
"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+))",
4002
"contentName": "meta.arrow.js.jsx meta.return.type.arrow.js.jsx",
4003
"patterns": [
4004
{
4005
"include": "#arrow-return-type-body"
4006
}
4007
]
4008
},
4009
"arrow-return-type-body": {
4010
"patterns": [
4011
{
4012
"begin": "(?<=[:])(?=\\s*\\{)",
4013
"end": "(?<=\\})",
4014
"patterns": [
4015
{
4016
"include": "#type-object"
4017
}
4018
]
4019
},
4020
{
4021
"include": "#type-predicate-operator"
4022
},
4023
{
4024
"include": "#type"
4025
}
4026
]
4027
},
4028
"type-parameters": {
4029
"name": "meta.type.parameters.js.jsx",
4030
"begin": "(<)",
4031
"beginCaptures": {
4032
"1": {
4033
"name": "punctuation.definition.typeparameters.begin.js.jsx"
4034
}
4035
},
4036
"end": "(>)",
4037
"endCaptures": {
4038
"1": {
4039
"name": "punctuation.definition.typeparameters.end.js.jsx"
4040
}
4041
},
4042
"patterns": [
4043
{
4044
"include": "#comment"
4045
},
4046
{
4047
"name": "storage.modifier.js.jsx",
4048
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out|const)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4049
},
4050
{
4051
"include": "#type"
4052
},
4053
{
4054
"include": "#punctuation-comma"
4055
},
4056
{
4057
"name": "keyword.operator.assignment.js.jsx",
4058
"match": "(=)(?!>)"
4059
}
4060
]
4061
},
4062
"type-arguments": {
4063
"name": "meta.type.parameters.js.jsx",
4064
"begin": "\\<",
4065
"beginCaptures": {
4066
"0": {
4067
"name": "punctuation.definition.typeparameters.begin.js.jsx"
4068
}
4069
},
4070
"end": "\\>",
4071
"endCaptures": {
4072
"0": {
4073
"name": "punctuation.definition.typeparameters.end.js.jsx"
4074
}
4075
},
4076
"patterns": [
4077
{
4078
"include": "#type-arguments-body"
4079
}
4080
]
4081
},
4082
"type-arguments-body": {
4083
"patterns": [
4084
{
4085
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(_)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4086
"captures": {
4087
"0": {
4088
"name": "keyword.operator.type.js.jsx"
4089
}
4090
}
4091
},
4092
{
4093
"include": "#type"
4094
},
4095
{
4096
"include": "#punctuation-comma"
4097
}
4098
]
4099
},
4100
"type": {
4101
"patterns": [
4102
{
4103
"include": "#comment"
4104
},
4105
{
4106
"include": "#type-string"
4107
},
4108
{
4109
"include": "#numeric-literal"
4110
},
4111
{
4112
"include": "#type-primitive"
4113
},
4114
{
4115
"include": "#type-builtin-literals"
4116
},
4117
{
4118
"include": "#type-parameters"
4119
},
4120
{
4121
"include": "#type-tuple"
4122
},
4123
{
4124
"include": "#type-object"
4125
},
4126
{
4127
"include": "#type-operators"
4128
},
4129
{
4130
"include": "#type-conditional"
4131
},
4132
{
4133
"include": "#type-fn-type-parameters"
4134
},
4135
{
4136
"include": "#type-paren-or-function-parameters"
4137
},
4138
{
4139
"include": "#type-function-return-type"
4140
},
4141
{
4142
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
4143
"captures": {
4144
"1": {
4145
"name": "storage.modifier.js.jsx"
4146
}
4147
}
4148
},
4149
{
4150
"include": "#type-name"
4151
}
4152
]
4153
},
4154
"type-primitive": {
4155
"name": "support.type.primitive.js.jsx",
4156
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(string|number|bigint|boolean|symbol|any|void|never|unknown)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4157
},
4158
"type-builtin-literals": {
4159
"name": "support.type.builtin.js.jsx",
4160
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4161
},
4162
"type-tuple": {
4163
"name": "meta.type.tuple.js.jsx",
4164
"begin": "\\[",
4165
"beginCaptures": {
4166
"0": {
4167
"name": "meta.brace.square.js.jsx"
4168
}
4169
},
4170
"end": "\\]",
4171
"endCaptures": {
4172
"0": {
4173
"name": "meta.brace.square.js.jsx"
4174
}
4175
},
4176
"patterns": [
4177
{
4178
"name": "keyword.operator.rest.js.jsx",
4179
"match": "\\.\\.\\."
4180
},
4181
{
4182
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?)?\\s*(:)",
4183
"captures": {
4184
"1": {
4185
"name": "entity.name.label.js.jsx"
4186
},
4187
"2": {
4188
"name": "keyword.operator.optional.js.jsx"
4189
},
4190
"3": {
4191
"name": "punctuation.separator.label.js.jsx"
4192
}
4193
}
4194
},
4195
{
4196
"include": "#type"
4197
},
4198
{
4199
"include": "#punctuation-comma"
4200
}
4201
]
4202
},
4203
"type-object": {
4204
"name": "meta.object.type.js.jsx",
4205
"begin": "\\{",
4206
"beginCaptures": {
4207
"0": {
4208
"name": "punctuation.definition.block.js.jsx"
4209
}
4210
},
4211
"end": "\\}",
4212
"endCaptures": {
4213
"0": {
4214
"name": "punctuation.definition.block.js.jsx"
4215
}
4216
},
4217
"patterns": [
4218
{
4219
"include": "#comment"
4220
},
4221
{
4222
"include": "#method-declaration"
4223
},
4224
{
4225
"include": "#indexer-declaration"
4226
},
4227
{
4228
"include": "#indexer-mapped-type-declaration"
4229
},
4230
{
4231
"include": "#field-declaration"
4232
},
4233
{
4234
"include": "#type-annotation"
4235
},
4236
{
4237
"begin": "\\.\\.\\.",
4238
"beginCaptures": {
4239
"0": {
4240
"name": "keyword.operator.spread.js.jsx"
4241
}
4242
},
4243
"end": "(?=\\}|;|,|$)|(?<=\\})",
4244
"patterns": [
4245
{
4246
"include": "#type"
4247
}
4248
]
4249
},
4250
{
4251
"include": "#punctuation-comma"
4252
},
4253
{
4254
"include": "#punctuation-semicolon"
4255
},
4256
{
4257
"include": "#type"
4258
}
4259
]
4260
},
4261
"type-conditional": {
4262
"patterns": [
4263
{
4264
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends)\\s+",
4265
"beginCaptures": {
4266
"1": {
4267
"name": "storage.modifier.js.jsx"
4268
}
4269
},
4270
"end": "(?<=:)",
4271
"patterns": [
4272
{
4273
"begin": "\\?",
4274
"beginCaptures": {
4275
"0": {
4276
"name": "keyword.operator.ternary.js.jsx"
4277
}
4278
},
4279
"end": ":",
4280
"endCaptures": {
4281
"0": {
4282
"name": "keyword.operator.ternary.js.jsx"
4283
}
4284
},
4285
"patterns": [
4286
{
4287
"include": "#type"
4288
}
4289
]
4290
},
4291
{
4292
"include": "#type"
4293
}
4294
]
4295
}
4296
]
4297
},
4298
"type-paren-or-function-parameters": {
4299
"name": "meta.type.paren.cover.js.jsx",
4300
"begin": "\\(",
4301
"beginCaptures": {
4302
"0": {
4303
"name": "meta.brace.round.js.jsx"
4304
}
4305
},
4306
"end": "\\)",
4307
"endCaptures": {
4308
"0": {
4309
"name": "meta.brace.round.js.jsx"
4310
}
4311
},
4312
"patterns": [
4313
{
4314
"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*))))))))",
4315
"captures": {
4316
"1": {
4317
"name": "storage.modifier.js.jsx"
4318
},
4319
"2": {
4320
"name": "keyword.operator.rest.js.jsx"
4321
},
4322
"3": {
4323
"name": "entity.name.function.js.jsx variable.language.this.js.jsx"
4324
},
4325
"4": {
4326
"name": "entity.name.function.js.jsx"
4327
},
4328
"5": {
4329
"name": "keyword.operator.optional.js.jsx"
4330
}
4331
}
4332
},
4333
{
4334
"match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=:)",
4335
"captures": {
4336
"1": {
4337
"name": "storage.modifier.js.jsx"
4338
},
4339
"2": {
4340
"name": "keyword.operator.rest.js.jsx"
4341
},
4342
"3": {
4343
"name": "variable.parameter.js.jsx variable.language.this.js.jsx"
4344
},
4345
"4": {
4346
"name": "variable.parameter.js.jsx"
4347
},
4348
"5": {
4349
"name": "keyword.operator.optional.js.jsx"
4350
}
4351
}
4352
},
4353
{
4354
"include": "#type-annotation"
4355
},
4356
{
4357
"name": "punctuation.separator.parameter.js.jsx",
4358
"match": ","
4359
},
4360
{
4361
"include": "#type"
4362
}
4363
]
4364
},
4365
"type-fn-type-parameters": {
4366
"patterns": [
4367
{
4368
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b(?=\\s*\\<)",
4369
"beginCaptures": {
4370
"1": {
4371
"name": "meta.type.constructor.js.jsx storage.modifier.js.jsx"
4372
},
4373
"2": {
4374
"name": "meta.type.constructor.js.jsx keyword.control.new.js.jsx"
4375
}
4376
},
4377
"end": "(?<=>)",
4378
"patterns": [
4379
{
4380
"include": "#comment"
4381
},
4382
{
4383
"include": "#type-parameters"
4384
}
4385
]
4386
},
4387
{
4388
"name": "meta.type.constructor.js.jsx",
4389
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b\\s*(?=\\()",
4390
"beginCaptures": {
4391
"1": {
4392
"name": "storage.modifier.js.jsx"
4393
},
4394
"2": {
4395
"name": "keyword.control.new.js.jsx"
4396
}
4397
},
4398
"end": "(?<=\\))",
4399
"patterns": [
4400
{
4401
"include": "#function-parameters"
4402
}
4403
]
4404
},
4405
{
4406
"name": "meta.type.function.js.jsx",
4407
"begin": "(?x)(\n (?=\n [(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )\n )\n)",
4408
"end": "(?<=\\))",
4409
"patterns": [
4410
{
4411
"include": "#function-parameters"
4412
}
4413
]
4414
}
4415
]
4416
},
4417
"type-function-return-type": {
4418
"patterns": [
4419
{
4420
"name": "meta.type.function.return.js.jsx",
4421
"begin": "(=>)(?=\\s*\\S)",
4422
"beginCaptures": {
4423
"1": {
4424
"name": "storage.type.function.arrow.js.jsx"
4425
}
4426
},
4427
"end": "(?<!=>)(?<![|&])(?=[,\\]\\)\\{\\}=;>:\\?]|//|$)",
4428
"patterns": [
4429
{
4430
"include": "#type-function-return-type-core"
4431
}
4432
]
4433
},
4434
{
4435
"name": "meta.type.function.return.js.jsx",
4436
"begin": "=>",
4437
"beginCaptures": {
4438
"0": {
4439
"name": "storage.type.function.arrow.js.jsx"
4440
}
4441
},
4442
"end": "(?<!=>)(?<![|&])((?=[,\\]\\)\\{\\}=;:\\?>]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
4443
"patterns": [
4444
{
4445
"include": "#type-function-return-type-core"
4446
}
4447
]
4448
}
4449
]
4450
},
4451
"type-function-return-type-core": {
4452
"patterns": [
4453
{
4454
"include": "#comment"
4455
},
4456
{
4457
"begin": "(?<==>)(?=\\s*\\{)",
4458
"end": "(?<=\\})",
4459
"patterns": [
4460
{
4461
"include": "#type-object"
4462
}
4463
]
4464
},
4465
{
4466
"include": "#type-predicate-operator"
4467
},
4468
{
4469
"include": "#type"
4470
}
4471
]
4472
},
4473
"type-operators": {
4474
"patterns": [
4475
{
4476
"include": "#typeof-operator"
4477
},
4478
{
4479
"include": "#type-infer"
4480
},
4481
{
4482
"begin": "([&|])(?=\\s*\\{)",
4483
"beginCaptures": {
4484
"0": {
4485
"name": "keyword.operator.type.js.jsx"
4486
}
4487
},
4488
"end": "(?<=\\})",
4489
"patterns": [
4490
{
4491
"include": "#type-object"
4492
}
4493
]
4494
},
4495
{
4496
"begin": "[&|]",
4497
"beginCaptures": {
4498
"0": {
4499
"name": "keyword.operator.type.js.jsx"
4500
}
4501
},
4502
"end": "(?=\\S)"
4503
},
4504
{
4505
"name": "keyword.operator.expression.keyof.js.jsx",
4506
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))keyof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4507
},
4508
{
4509
"name": "keyword.operator.ternary.js.jsx",
4510
"match": "(\\?|\\:)"
4511
},
4512
{
4513
"name": "keyword.operator.expression.import.js.jsx",
4514
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*\\()"
4515
}
4516
]
4517
},
4518
"type-infer": {
4519
"patterns": [
4520
{
4521
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(infer)\\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s+(extends)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))?",
4522
"name": "meta.type.infer.js.jsx",
4523
"captures": {
4524
"1": {
4525
"name": "keyword.operator.expression.infer.js.jsx"
4526
},
4527
"2": {
4528
"name": "entity.name.type.js.jsx"
4529
},
4530
"3": {
4531
"name": "keyword.operator.expression.extends.js.jsx"
4532
}
4533
}
4534
}
4535
]
4536
},
4537
"type-predicate-operator": {
4538
"patterns": [
4539
{
4540
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(asserts)\\s+)?(?!asserts)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s(is)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4541
"captures": {
4542
"1": {
4543
"name": "keyword.operator.type.asserts.js.jsx"
4544
},
4545
"2": {
4546
"name": "variable.parameter.js.jsx variable.language.this.js.jsx"
4547
},
4548
"3": {
4549
"name": "variable.parameter.js.jsx"
4550
},
4551
"4": {
4552
"name": "keyword.operator.expression.is.js.jsx"
4553
}
4554
}
4555
},
4556
{
4557
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(asserts)\\s+(?!is)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4558
"captures": {
4559
"1": {
4560
"name": "keyword.operator.type.asserts.js.jsx"
4561
},
4562
"2": {
4563
"name": "variable.parameter.js.jsx variable.language.this.js.jsx"
4564
},
4565
"3": {
4566
"name": "variable.parameter.js.jsx"
4567
}
4568
}
4569
},
4570
{
4571
"name": "keyword.operator.type.asserts.js.jsx",
4572
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))asserts(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4573
},
4574
{
4575
"name": "keyword.operator.expression.is.js.jsx",
4576
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))is(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4577
}
4578
]
4579
},
4580
"type-name": {
4581
"patterns": [
4582
{
4583
"begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(<)",
4584
"captures": {
4585
"1": {
4586
"name": "entity.name.type.module.js.jsx"
4587
},
4588
"2": {
4589
"name": "punctuation.accessor.js.jsx"
4590
},
4591
"3": {
4592
"name": "punctuation.accessor.optional.js.jsx"
4593
},
4594
"4": {
4595
"name": "meta.type.parameters.js.jsx punctuation.definition.typeparameters.begin.js.jsx"
4596
}
4597
},
4598
"end": "(>)",
4599
"endCaptures": {
4600
"1": {
4601
"name": "meta.type.parameters.js.jsx punctuation.definition.typeparameters.end.js.jsx"
4602
}
4603
},
4604
"contentName": "meta.type.parameters.js.jsx",
4605
"patterns": [
4606
{
4607
"include": "#type-arguments-body"
4608
}
4609
]
4610
},
4611
{
4612
"begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(<)",
4613
"beginCaptures": {
4614
"1": {
4615
"name": "entity.name.type.js.jsx"
4616
},
4617
"2": {
4618
"name": "meta.type.parameters.js.jsx punctuation.definition.typeparameters.begin.js.jsx"
4619
}
4620
},
4621
"end": "(>)",
4622
"endCaptures": {
4623
"1": {
4624
"name": "meta.type.parameters.js.jsx punctuation.definition.typeparameters.end.js.jsx"
4625
}
4626
},
4627
"contentName": "meta.type.parameters.js.jsx",
4628
"patterns": [
4629
{
4630
"include": "#type-arguments-body"
4631
}
4632
]
4633
},
4634
{
4635
"match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))",
4636
"captures": {
4637
"1": {
4638
"name": "entity.name.type.module.js.jsx"
4639
},
4640
"2": {
4641
"name": "punctuation.accessor.js.jsx"
4642
},
4643
"3": {
4644
"name": "punctuation.accessor.optional.js.jsx"
4645
}
4646
}
4647
},
4648
{
4649
"name": "entity.name.type.js.jsx",
4650
"match": "[_$[:alpha:]][_$[:alnum:]]*"
4651
}
4652
]
4653
},
4654
"punctuation-comma": {
4655
"name": "punctuation.separator.comma.js.jsx",
4656
"match": ","
4657
},
4658
"punctuation-semicolon": {
4659
"name": "punctuation.terminator.statement.js.jsx",
4660
"match": ";"
4661
},
4662
"punctuation-accessor": {
4663
"match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))",
4664
"captures": {
4665
"1": {
4666
"name": "punctuation.accessor.js.jsx"
4667
},
4668
"2": {
4669
"name": "punctuation.accessor.optional.js.jsx"
4670
}
4671
}
4672
},
4673
"string": {
4674
"patterns": [
4675
{
4676
"include": "#qstring-single"
4677
},
4678
{
4679
"include": "#qstring-double"
4680
},
4681
{
4682
"include": "#template"
4683
}
4684
]
4685
},
4686
"qstring-double": {
4687
"name": "string.quoted.double.js.jsx",
4688
"begin": "\"",
4689
"beginCaptures": {
4690
"0": {
4691
"name": "punctuation.definition.string.begin.js.jsx"
4692
}
4693
},
4694
"end": "(\")|((?:[^\\\\\\n])$)",
4695
"endCaptures": {
4696
"1": {
4697
"name": "punctuation.definition.string.end.js.jsx"
4698
},
4699
"2": {
4700
"name": "invalid.illegal.newline.js.jsx"
4701
}
4702
},
4703
"patterns": [
4704
{
4705
"include": "#string-character-escape"
4706
}
4707
]
4708
},
4709
"qstring-single": {
4710
"name": "string.quoted.single.js.jsx",
4711
"begin": "'",
4712
"beginCaptures": {
4713
"0": {
4714
"name": "punctuation.definition.string.begin.js.jsx"
4715
}
4716
},
4717
"end": "(\\')|((?:[^\\\\\\n])$)",
4718
"endCaptures": {
4719
"1": {
4720
"name": "punctuation.definition.string.end.js.jsx"
4721
},
4722
"2": {
4723
"name": "invalid.illegal.newline.js.jsx"
4724
}
4725
},
4726
"patterns": [
4727
{
4728
"include": "#string-character-escape"
4729
}
4730
]
4731
},
4732
"string-character-escape": {
4733
"name": "constant.character.escape.js.jsx",
4734
"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]?|.|$)"
4735
},
4736
"template": {
4737
"patterns": [
4738
{
4739
"include": "#template-call"
4740
},
4741
{
4742
"contentName": "string.template.js.jsx",
4743
"begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
4744
"beginCaptures": {
4745
"1": {
4746
"name": "entity.name.function.tagged-template.js.jsx"
4747
},
4748
"2": {
4749
"name": "string.template.js.jsx punctuation.definition.string.template.begin.js.jsx"
4750
}
4751
},
4752
"end": "`",
4753
"endCaptures": {
4754
"0": {
4755
"name": "string.template.js.jsx punctuation.definition.string.template.end.js.jsx"
4756
}
4757
},
4758
"patterns": [
4759
{
4760
"include": "#template-substitution-element"
4761
},
4762
{
4763
"include": "#string-character-escape"
4764
}
4765
]
4766
}
4767
]
4768
},
4769
"template-call": {
4770
"patterns": [
4771
{
4772
"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*)?`)",
4773
"end": "(?=`)",
4774
"patterns": [
4775
{
4776
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))",
4777
"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*)?`)",
4778
"patterns": [
4779
{
4780
"include": "#support-function-call-identifiers"
4781
},
4782
{
4783
"name": "entity.name.function.tagged-template.js.jsx",
4784
"match": "([_$[:alpha:]][_$[:alnum:]]*)"
4785
}
4786
]
4787
},
4788
{
4789
"include": "#type-arguments"
4790
}
4791
]
4792
},
4793
{
4794
"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*)`)",
4795
"beginCaptures": {
4796
"1": {
4797
"name": "entity.name.function.tagged-template.js.jsx"
4798
}
4799
},
4800
"end": "(?=`)",
4801
"patterns": [
4802
{
4803
"include": "#type-arguments"
4804
}
4805
]
4806
}
4807
]
4808
},
4809
"template-substitution-element": {
4810
"name": "meta.template.expression.js.jsx",
4811
"begin": "\\$\\{",
4812
"beginCaptures": {
4813
"0": {
4814
"name": "punctuation.definition.template-expression.begin.js.jsx"
4815
}
4816
},
4817
"end": "\\}",
4818
"endCaptures": {
4819
"0": {
4820
"name": "punctuation.definition.template-expression.end.js.jsx"
4821
}
4822
},
4823
"patterns": [
4824
{
4825
"include": "#expression"
4826
}
4827
],
4828
"contentName": "meta.embedded.line.js.jsx"
4829
},
4830
"type-string": {
4831
"patterns": [
4832
{
4833
"include": "#qstring-single"
4834
},
4835
{
4836
"include": "#qstring-double"
4837
},
4838
{
4839
"include": "#template-type"
4840
}
4841
]
4842
},
4843
"template-type": {
4844
"patterns": [
4845
{
4846
"include": "#template-call"
4847
},
4848
{
4849
"contentName": "string.template.js.jsx",
4850
"begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
4851
"beginCaptures": {
4852
"1": {
4853
"name": "entity.name.function.tagged-template.js.jsx"
4854
},
4855
"2": {
4856
"name": "string.template.js.jsx punctuation.definition.string.template.begin.js.jsx"
4857
}
4858
},
4859
"end": "`",
4860
"endCaptures": {
4861
"0": {
4862
"name": "string.template.js.jsx punctuation.definition.string.template.end.js.jsx"
4863
}
4864
},
4865
"patterns": [
4866
{
4867
"include": "#template-type-substitution-element"
4868
},
4869
{
4870
"include": "#string-character-escape"
4871
}
4872
]
4873
}
4874
]
4875
},
4876
"template-type-substitution-element": {
4877
"name": "meta.template.expression.js.jsx",
4878
"begin": "\\$\\{",
4879
"beginCaptures": {
4880
"0": {
4881
"name": "punctuation.definition.template-expression.begin.js.jsx"
4882
}
4883
},
4884
"end": "\\}",
4885
"endCaptures": {
4886
"0": {
4887
"name": "punctuation.definition.template-expression.end.js.jsx"
4888
}
4889
},
4890
"patterns": [
4891
{
4892
"include": "#type"
4893
}
4894
],
4895
"contentName": "meta.embedded.line.js.jsx"
4896
},
4897
"regex": {
4898
"patterns": [
4899
{
4900
"name": "string.regexp.js.jsx",
4901
"begin": "(?<!\\+\\+|--|})(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([dgimsuvy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
4902
"beginCaptures": {
4903
"1": {
4904
"name": "punctuation.definition.string.begin.js.jsx"
4905
}
4906
},
4907
"end": "(/)([dgimsuvy]*)",
4908
"endCaptures": {
4909
"1": {
4910
"name": "punctuation.definition.string.end.js.jsx"
4911
},
4912
"2": {
4913
"name": "keyword.other.js.jsx"
4914
}
4915
},
4916
"patterns": [
4917
{
4918
"include": "#regexp"
4919
}
4920
]
4921
},
4922
{
4923
"name": "string.regexp.js.jsx",
4924
"begin": "((?<![_$[:alnum:])\\]]|\\+\\+|--|}|\\*\\/)|((?<=^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case))\\s*)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuvy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
4925
"beginCaptures": {
4926
"0": {
4927
"name": "punctuation.definition.string.begin.js.jsx"
4928
}
4929
},
4930
"end": "(/)([dgimsuvy]*)",
4931
"endCaptures": {
4932
"1": {
4933
"name": "punctuation.definition.string.end.js.jsx"
4934
},
4935
"2": {
4936
"name": "keyword.other.js.jsx"
4937
}
4938
},
4939
"patterns": [
4940
{
4941
"include": "#regexp"
4942
}
4943
]
4944
}
4945
]
4946
},
4947
"regexp": {
4948
"patterns": [
4949
{
4950
"name": "keyword.control.anchor.regexp",
4951
"match": "\\\\[bB]|\\^|\\$"
4952
},
4953
{
4954
"match": "\\\\[1-9]\\d*|\\\\k<([a-zA-Z_$][\\w$]*)>",
4955
"captures": {
4956
"0": {
4957
"name": "keyword.other.back-reference.regexp"
4958
},
4959
"1": {
4960
"name": "variable.other.regexp"
4961
}
4962
}
4963
},
4964
{
4965
"name": "keyword.operator.quantifier.regexp",
4966
"match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??"
4967
},
4968
{
4969
"name": "keyword.operator.or.regexp",
4970
"match": "\\|"
4971
},
4972
{
4973
"name": "meta.group.assertion.regexp",
4974
"begin": "(\\()((\\?=)|(\\?!)|(\\?<=)|(\\?<!))",
4975
"beginCaptures": {
4976
"1": {
4977
"name": "punctuation.definition.group.regexp"
4978
},
4979
"2": {
4980
"name": "punctuation.definition.group.assertion.regexp"
4981
},
4982
"3": {
4983
"name": "meta.assertion.look-ahead.regexp"
4984
},
4985
"4": {
4986
"name": "meta.assertion.negative-look-ahead.regexp"
4987
},
4988
"5": {
4989
"name": "meta.assertion.look-behind.regexp"
4990
},
4991
"6": {
4992
"name": "meta.assertion.negative-look-behind.regexp"
4993
}
4994
},
4995
"end": "(\\))",
4996
"endCaptures": {
4997
"1": {
4998
"name": "punctuation.definition.group.regexp"
4999
}
5000
},
5001
"patterns": [
5002
{
5003
"include": "#regexp"
5004
}
5005
]
5006
},
5007
{
5008
"name": "meta.group.regexp",
5009
"begin": "\\((?:(\\?:)|(?:\\?<([a-zA-Z_$][\\w$]*)>))?",
5010
"beginCaptures": {
5011
"0": {
5012
"name": "punctuation.definition.group.regexp"
5013
},
5014
"1": {
5015
"name": "punctuation.definition.group.no-capture.regexp"
5016
},
5017
"2": {
5018
"name": "variable.other.regexp"
5019
}
5020
},
5021
"end": "\\)",
5022
"endCaptures": {
5023
"0": {
5024
"name": "punctuation.definition.group.regexp"
5025
}
5026
},
5027
"patterns": [
5028
{
5029
"include": "#regexp"
5030
}
5031
]
5032
},
5033
{
5034
"name": "constant.other.character-class.set.regexp",
5035
"begin": "(\\[)(\\^)?",
5036
"beginCaptures": {
5037
"1": {
5038
"name": "punctuation.definition.character-class.regexp"
5039
},
5040
"2": {
5041
"name": "keyword.operator.negation.regexp"
5042
}
5043
},
5044
"end": "(\\])",
5045
"endCaptures": {
5046
"1": {
5047
"name": "punctuation.definition.character-class.regexp"
5048
}
5049
},
5050
"patterns": [
5051
{
5052
"name": "constant.other.character-class.range.regexp",
5053
"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])|(\\\\.))",
5054
"captures": {
5055
"1": {
5056
"name": "constant.character.numeric.regexp"
5057
},
5058
"2": {
5059
"name": "constant.character.control.regexp"
5060
},
5061
"3": {
5062
"name": "constant.character.escape.backslash.regexp"
5063
},
5064
"4": {
5065
"name": "constant.character.numeric.regexp"
5066
},
5067
"5": {
5068
"name": "constant.character.control.regexp"
5069
},
5070
"6": {
5071
"name": "constant.character.escape.backslash.regexp"
5072
}
5073
}
5074
},
5075
{
5076
"include": "#regex-character-class"
5077
}
5078
]
5079
},
5080
{
5081
"include": "#regex-character-class"
5082
}
5083
]
5084
},
5085
"regex-character-class": {
5086
"patterns": [
5087
{
5088
"name": "constant.other.character-class.regexp",
5089
"match": "\\\\[wWsSdDtrnvf]|\\."
5090
},
5091
{
5092
"name": "constant.character.numeric.regexp",
5093
"match": "\\\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})"
5094
},
5095
{
5096
"name": "constant.character.control.regexp",
5097
"match": "\\\\c[A-Z]"
5098
},
5099
{
5100
"name": "constant.character.escape.backslash.regexp",
5101
"match": "\\\\."
5102
}
5103
]
5104
},
5105
"comment": {
5106
"patterns": [
5107
{
5108
"name": "comment.block.documentation.js.jsx",
5109
"begin": "/\\*\\*(?!/)",
5110
"beginCaptures": {
5111
"0": {
5112
"name": "punctuation.definition.comment.js.jsx"
5113
}
5114
},
5115
"end": "\\*/",
5116
"endCaptures": {
5117
"0": {
5118
"name": "punctuation.definition.comment.js.jsx"
5119
}
5120
},
5121
"patterns": [
5122
{
5123
"include": "#docblock"
5124
}
5125
]
5126
},
5127
{
5128
"name": "comment.block.js.jsx",
5129
"begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?",
5130
"beginCaptures": {
5131
"1": {
5132
"name": "punctuation.definition.comment.js.jsx"
5133
},
5134
"2": {
5135
"name": "storage.type.internaldeclaration.js.jsx"
5136
},
5137
"3": {
5138
"name": "punctuation.decorator.internaldeclaration.js.jsx"
5139
}
5140
},
5141
"end": "\\*/",
5142
"endCaptures": {
5143
"0": {
5144
"name": "punctuation.definition.comment.js.jsx"
5145
}
5146
}
5147
},
5148
{
5149
"begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)",
5150
"beginCaptures": {
5151
"1": {
5152
"name": "punctuation.whitespace.comment.leading.js.jsx"
5153
},
5154
"2": {
5155
"name": "comment.line.double-slash.js.jsx"
5156
},
5157
"3": {
5158
"name": "punctuation.definition.comment.js.jsx"
5159
},
5160
"4": {
5161
"name": "storage.type.internaldeclaration.js.jsx"
5162
},
5163
"5": {
5164
"name": "punctuation.decorator.internaldeclaration.js.jsx"
5165
}
5166
},
5167
"end": "(?=$)",
5168
"contentName": "comment.line.double-slash.js.jsx"
5169
}
5170
]
5171
},
5172
"single-line-comment-consuming-line-ending": {
5173
"begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)",
5174
"beginCaptures": {
5175
"1": {
5176
"name": "punctuation.whitespace.comment.leading.js.jsx"
5177
},
5178
"2": {
5179
"name": "comment.line.double-slash.js.jsx"
5180
},
5181
"3": {
5182
"name": "punctuation.definition.comment.js.jsx"
5183
},
5184
"4": {
5185
"name": "storage.type.internaldeclaration.js.jsx"
5186
},
5187
"5": {
5188
"name": "punctuation.decorator.internaldeclaration.js.jsx"
5189
}
5190
},
5191
"end": "(?=^)",
5192
"contentName": "comment.line.double-slash.js.jsx"
5193
},
5194
"directives": {
5195
"name": "comment.line.triple-slash.directive.js.jsx",
5196
"begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name|resolution-mode)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)",
5197
"beginCaptures": {
5198
"1": {
5199
"name": "punctuation.definition.comment.js.jsx"
5200
}
5201
},
5202
"end": "(?=$)",
5203
"patterns": [
5204
{
5205
"name": "meta.tag.js.jsx",
5206
"begin": "(<)(reference|amd-dependency|amd-module)",
5207
"beginCaptures": {
5208
"1": {
5209
"name": "punctuation.definition.tag.directive.js.jsx"
5210
},
5211
"2": {
5212
"name": "entity.name.tag.directive.js.jsx"
5213
}
5214
},
5215
"end": "/>",
5216
"endCaptures": {
5217
"0": {
5218
"name": "punctuation.definition.tag.directive.js.jsx"
5219
}
5220
},
5221
"patterns": [
5222
{
5223
"name": "entity.other.attribute-name.directive.js.jsx",
5224
"match": "path|types|no-default-lib|lib|name|resolution-mode"
5225
},
5226
{
5227
"name": "keyword.operator.assignment.js.jsx",
5228
"match": "="
5229
},
5230
{
5231
"include": "#string"
5232
}
5233
]
5234
}
5235
]
5236
},
5237
"docblock": {
5238
"patterns": [
5239
{
5240
"match": "(?x)\n((@)(?:access|api))\n\\s+\n(private|protected|public)\n\\b",
5241
"captures": {
5242
"1": {
5243
"name": "storage.type.class.jsdoc"
5244
},
5245
"2": {
5246
"name": "punctuation.definition.block.tag.jsdoc"
5247
},
5248
"3": {
5249
"name": "constant.language.access-type.jsdoc"
5250
}
5251
}
5252
},
5253
{
5254
"match": "(?x)\n((@)author)\n\\s+\n(\n [^@\\s<>*/]\n (?:[^@<>*/]|\\*[^/])*\n)\n(?:\n \\s*\n (<)\n ([^>\\s]+)\n (>)\n)?",
5255
"captures": {
5256
"1": {
5257
"name": "storage.type.class.jsdoc"
5258
},
5259
"2": {
5260
"name": "punctuation.definition.block.tag.jsdoc"
5261
},
5262
"3": {
5263
"name": "entity.name.type.instance.jsdoc"
5264
},
5265
"4": {
5266
"name": "punctuation.definition.bracket.angle.begin.jsdoc"
5267
},
5268
"5": {
5269
"name": "constant.other.email.link.underline.jsdoc"
5270
},
5271
"6": {
5272
"name": "punctuation.definition.bracket.angle.end.jsdoc"
5273
}
5274
}
5275
},
5276
{
5277
"match": "(?x)\n((@)borrows) \\s+\n((?:[^@\\s*/]|\\*[^/])+) # <that namepath>\n\\s+ (as) \\s+ # as\n((?:[^@\\s*/]|\\*[^/])+) # <this namepath>",
5278
"captures": {
5279
"1": {
5280
"name": "storage.type.class.jsdoc"
5281
},
5282
"2": {
5283
"name": "punctuation.definition.block.tag.jsdoc"
5284
},
5285
"3": {
5286
"name": "entity.name.type.instance.jsdoc"
5287
},
5288
"4": {
5289
"name": "keyword.operator.control.jsdoc"
5290
},
5291
"5": {
5292
"name": "entity.name.type.instance.jsdoc"
5293
}
5294
}
5295
},
5296
{
5297
"name": "meta.example.jsdoc",
5298
"begin": "((@)example)\\s+",
5299
"end": "(?=@|\\*/)",
5300
"beginCaptures": {
5301
"1": {
5302
"name": "storage.type.class.jsdoc"
5303
},
5304
"2": {
5305
"name": "punctuation.definition.block.tag.jsdoc"
5306
}
5307
},
5308
"patterns": [
5309
{
5310
"match": "^\\s\\*\\s+"
5311
},
5312
{
5313
"contentName": "constant.other.description.jsdoc",
5314
"begin": "\\G(<)caption(>)",
5315
"beginCaptures": {
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
"end": "(</)caption(>)|(?=\\*/)",
5327
"endCaptures": {
5328
"0": {
5329
"name": "entity.name.tag.inline.jsdoc"
5330
},
5331
"1": {
5332
"name": "punctuation.definition.bracket.angle.begin.jsdoc"
5333
},
5334
"2": {
5335
"name": "punctuation.definition.bracket.angle.end.jsdoc"
5336
}
5337
}
5338
},
5339
{
5340
"match": "[^\\s@*](?:[^*]|\\*[^/])*",
5341
"captures": {
5342
"0": {
5343
"name": "source.embedded.js.jsx"
5344
}
5345
}
5346
}
5347
]
5348
},
5349
{
5350
"match": "(?x) ((@)kind) \\s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \\b",
5351
"captures": {
5352
"1": {
5353
"name": "storage.type.class.jsdoc"
5354
},
5355
"2": {
5356
"name": "punctuation.definition.block.tag.jsdoc"
5357
},
5358
"3": {
5359
"name": "constant.language.symbol-type.jsdoc"
5360
}
5361
}
5362
},
5363
{
5364
"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)",
5365
"captures": {
5366
"1": {
5367
"name": "storage.type.class.jsdoc"
5368
},
5369
"2": {
5370
"name": "punctuation.definition.block.tag.jsdoc"
5371
},
5372
"3": {
5373
"name": "variable.other.link.underline.jsdoc"
5374
},
5375
"4": {
5376
"name": "entity.name.type.instance.jsdoc"
5377
}
5378
}
5379
},
5380
{
5381
"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)",
5382
"captures": {
5383
"1": {
5384
"name": "storage.type.class.jsdoc"
5385
},
5386
"2": {
5387
"name": "punctuation.definition.block.tag.jsdoc"
5388
},
5389
"3": {
5390
"name": "variable.other.jsdoc"
5391
}
5392
}
5393
},
5394
{
5395
"begin": "(?x)((@)template)\\s+(?={)",
5396
"beginCaptures": {
5397
"1": {
5398
"name": "storage.type.class.jsdoc"
5399
},
5400
"2": {
5401
"name": "punctuation.definition.block.tag.jsdoc"
5402
}
5403
},
5404
"end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5405
"patterns": [
5406
{
5407
"include": "#jsdoctype"
5408
},
5409
{
5410
"name": "variable.other.jsdoc",
5411
"match": "([A-Za-z_$][\\w$.\\[\\]]*)"
5412
}
5413
]
5414
},
5415
{
5416
"match": "(?x)\n(\n (@)\n (?:arg|argument|const|constant|member|namespace|param|var)\n)\n\\s+\n(\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n)",
5417
"captures": {
5418
"1": {
5419
"name": "storage.type.class.jsdoc"
5420
},
5421
"2": {
5422
"name": "punctuation.definition.block.tag.jsdoc"
5423
},
5424
"3": {
5425
"name": "variable.other.jsdoc"
5426
}
5427
}
5428
},
5429
{
5430
"begin": "((@)typedef)\\s+(?={)",
5431
"beginCaptures": {
5432
"1": {
5433
"name": "storage.type.class.jsdoc"
5434
},
5435
"2": {
5436
"name": "punctuation.definition.block.tag.jsdoc"
5437
}
5438
},
5439
"end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5440
"patterns": [
5441
{
5442
"include": "#jsdoctype"
5443
},
5444
{
5445
"name": "entity.name.type.instance.jsdoc",
5446
"match": "(?:[^@\\s*/]|\\*[^/])+"
5447
}
5448
]
5449
},
5450
{
5451
"begin": "((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?={)",
5452
"beginCaptures": {
5453
"1": {
5454
"name": "storage.type.class.jsdoc"
5455
},
5456
"2": {
5457
"name": "punctuation.definition.block.tag.jsdoc"
5458
}
5459
},
5460
"end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5461
"patterns": [
5462
{
5463
"include": "#jsdoctype"
5464
},
5465
{
5466
"name": "variable.other.jsdoc",
5467
"match": "([A-Za-z_$][\\w$.\\[\\]]*)"
5468
},
5469
{
5470
"name": "variable.other.jsdoc",
5471
"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/])+)?|(?=\\*/))",
5472
"captures": {
5473
"1": {
5474
"name": "punctuation.definition.optional-value.begin.bracket.square.jsdoc"
5475
},
5476
"2": {
5477
"name": "keyword.operator.assignment.jsdoc"
5478
},
5479
"3": {
5480
"name": "source.embedded.js.jsx"
5481
},
5482
"4": {
5483
"name": "punctuation.definition.optional-value.end.bracket.square.jsdoc"
5484
},
5485
"5": {
5486
"name": "invalid.illegal.syntax.jsdoc"
5487
}
5488
}
5489
}
5490
]
5491
},
5492
{
5493
"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+(?={)",
5494
"beginCaptures": {
5495
"1": {
5496
"name": "storage.type.class.jsdoc"
5497
},
5498
"2": {
5499
"name": "punctuation.definition.block.tag.jsdoc"
5500
}
5501
},
5502
"end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5503
"patterns": [
5504
{
5505
"include": "#jsdoctype"
5506
}
5507
]
5508
},
5509
{
5510
"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)",
5511
"captures": {
5512
"1": {
5513
"name": "storage.type.class.jsdoc"
5514
},
5515
"2": {
5516
"name": "punctuation.definition.block.tag.jsdoc"
5517
},
5518
"3": {
5519
"name": "entity.name.type.instance.jsdoc"
5520
}
5521
}
5522
},
5523
{
5524
"contentName": "variable.other.jsdoc",
5525
"begin": "((@)(?:default(?:value)?|license|version))\\s+(([''\"]))",
5526
"beginCaptures": {
5527
"1": {
5528
"name": "storage.type.class.jsdoc"
5529
},
5530
"2": {
5531
"name": "punctuation.definition.block.tag.jsdoc"
5532
},
5533
"3": {
5534
"name": "variable.other.jsdoc"
5535
},
5536
"4": {
5537
"name": "punctuation.definition.string.begin.jsdoc"
5538
}
5539
},
5540
"end": "(\\3)|(?=$|\\*/)",
5541
"endCaptures": {
5542
"0": {
5543
"name": "variable.other.jsdoc"
5544
},
5545
"1": {
5546
"name": "punctuation.definition.string.end.jsdoc"
5547
}
5548
}
5549
},
5550
{
5551
"match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^\\s*]+)",
5552
"captures": {
5553
"1": {
5554
"name": "storage.type.class.jsdoc"
5555
},
5556
"2": {
5557
"name": "punctuation.definition.block.tag.jsdoc"
5558
},
5559
"3": {
5560
"name": "variable.other.jsdoc"
5561
}
5562
}
5563
},
5564
{
5565
"name": "storage.type.class.jsdoc",
5566
"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",
5567
"captures": {
5568
"1": {
5569
"name": "punctuation.definition.block.tag.jsdoc"
5570
}
5571
}
5572
},
5573
{
5574
"include": "#inline-tags"
5575
},
5576
{
5577
"match": "((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\\s+)",
5578
"captures": {
5579
"1": {
5580
"name": "storage.type.class.jsdoc"
5581
},
5582
"2": {
5583
"name": "punctuation.definition.block.tag.jsdoc"
5584
}
5585
}
5586
}
5587
]
5588
},
5589
"brackets": {
5590
"patterns": [
5591
{
5592
"begin": "{",
5593
"end": "}|(?=\\*/)",
5594
"patterns": [
5595
{
5596
"include": "#brackets"
5597
}
5598
]
5599
},
5600
{
5601
"begin": "\\[",
5602
"end": "\\]|(?=\\*/)",
5603
"patterns": [
5604
{
5605
"include": "#brackets"
5606
}
5607
]
5608
}
5609
]
5610
},
5611
"inline-tags": {
5612
"patterns": [
5613
{
5614
"name": "constant.other.description.jsdoc",
5615
"match": "(\\[)[^\\]]+(\\])(?={@(?:link|linkcode|linkplain|tutorial))",
5616
"captures": {
5617
"1": {
5618
"name": "punctuation.definition.bracket.square.begin.jsdoc"
5619
},
5620
"2": {
5621
"name": "punctuation.definition.bracket.square.end.jsdoc"
5622
}
5623
}
5624
},
5625
{
5626
"name": "entity.name.type.instance.jsdoc",
5627
"begin": "({)((@)(?:link(?:code|plain)?|tutorial))\\s*",
5628
"beginCaptures": {
5629
"1": {
5630
"name": "punctuation.definition.bracket.curly.begin.jsdoc"
5631
},
5632
"2": {
5633
"name": "storage.type.class.jsdoc"
5634
},
5635
"3": {
5636
"name": "punctuation.definition.inline.tag.jsdoc"
5637
}
5638
},
5639
"end": "}|(?=\\*/)",
5640
"endCaptures": {
5641
"0": {
5642
"name": "punctuation.definition.bracket.curly.end.jsdoc"
5643
}
5644
},
5645
"patterns": [
5646
{
5647
"match": "\\G((?=https?://)(?:[^|}\\s*]|\\*[/])+)(\\|)?",
5648
"captures": {
5649
"1": {
5650
"name": "variable.other.link.underline.jsdoc"
5651
},
5652
"2": {
5653
"name": "punctuation.separator.pipe.jsdoc"
5654
}
5655
}
5656
},
5657
{
5658
"match": "\\G((?:[^{}@\\s|*]|\\*[^/])+)(\\|)?",
5659
"captures": {
5660
"1": {
5661
"name": "variable.other.description.jsdoc"
5662
},
5663
"2": {
5664
"name": "punctuation.separator.pipe.jsdoc"
5665
}
5666
}
5667
}
5668
]
5669
}
5670
]
5671
},
5672
"jsdoctype": {
5673
"patterns": [
5674
{
5675
"contentName": "entity.name.type.instance.jsdoc",
5676
"begin": "\\G({)",
5677
"beginCaptures": {
5678
"0": {
5679
"name": "entity.name.type.instance.jsdoc"
5680
},
5681
"1": {
5682
"name": "punctuation.definition.bracket.curly.begin.jsdoc"
5683
}
5684
},
5685
"end": "((}))\\s*|(?=\\*/)",
5686
"endCaptures": {
5687
"1": {
5688
"name": "entity.name.type.instance.jsdoc"
5689
},
5690
"2": {
5691
"name": "punctuation.definition.bracket.curly.end.jsdoc"
5692
}
5693
},
5694
"patterns": [
5695
{
5696
"include": "#brackets"
5697
}
5698
]
5699
}
5700
]
5701
},
5702
"jsx": {
5703
"patterns": [
5704
{
5705
"include": "#jsx-tag-without-attributes-in-expression"
5706
},
5707
{
5708
"include": "#jsx-tag-in-expression"
5709
}
5710
]
5711
},
5712
"jsx-tag-without-attributes-in-expression": {
5713
"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*(>))",
5714
"end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>))",
5715
"patterns": [
5716
{
5717
"include": "#jsx-tag-without-attributes"
5718
}
5719
]
5720
},
5721
"jsx-tag-without-attributes": {
5722
"name": "meta.tag.without-attributes.js.jsx",
5723
"begin": "(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>)",
5724
"end": "(</)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>)",
5725
"beginCaptures": {
5726
"1": {
5727
"name": "punctuation.definition.tag.begin.js.jsx"
5728
},
5729
"2": {
5730
"name": "entity.name.tag.namespace.js.jsx"
5731
},
5732
"3": {
5733
"name": "punctuation.separator.namespace.js.jsx"
5734
},
5735
"4": {
5736
"name": "entity.name.tag.js.jsx"
5737
},
5738
"5": {
5739
"name": "support.class.component.js.jsx"
5740
},
5741
"6": {
5742
"name": "punctuation.definition.tag.end.js.jsx"
5743
}
5744
},
5745
"endCaptures": {
5746
"1": {
5747
"name": "punctuation.definition.tag.begin.js.jsx"
5748
},
5749
"2": {
5750
"name": "entity.name.tag.namespace.js.jsx"
5751
},
5752
"3": {
5753
"name": "punctuation.separator.namespace.js.jsx"
5754
},
5755
"4": {
5756
"name": "entity.name.tag.js.jsx"
5757
},
5758
"5": {
5759
"name": "support.class.component.js.jsx"
5760
},
5761
"6": {
5762
"name": "punctuation.definition.tag.end.js.jsx"
5763
}
5764
},
5765
"contentName": "meta.jsx.children.js.jsx",
5766
"patterns": [
5767
{
5768
"include": "#jsx-children"
5769
}
5770
]
5771
},
5772
"jsx-tag-in-expression": {
5773
"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+))(?!\\?)|\\/?>))",
5774
"end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>))",
5775
"patterns": [
5776
{
5777
"include": "#jsx-tag"
5778
}
5779
]
5780
},
5781
"jsx-tag": {
5782
"name": "meta.tag.js.jsx",
5783
"begin": "(?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>))",
5784
"end": "(/>)|(?:(</)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>))",
5785
"endCaptures": {
5786
"1": {
5787
"name": "punctuation.definition.tag.end.js.jsx"
5788
},
5789
"2": {
5790
"name": "punctuation.definition.tag.begin.js.jsx"
5791
},
5792
"3": {
5793
"name": "entity.name.tag.namespace.js.jsx"
5794
},
5795
"4": {
5796
"name": "punctuation.separator.namespace.js.jsx"
5797
},
5798
"5": {
5799
"name": "entity.name.tag.js.jsx"
5800
},
5801
"6": {
5802
"name": "support.class.component.js.jsx"
5803
},
5804
"7": {
5805
"name": "punctuation.definition.tag.end.js.jsx"
5806
}
5807
},
5808
"patterns": [
5809
{
5810
"begin": "(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>)",
5811
"beginCaptures": {
5812
"1": {
5813
"name": "punctuation.definition.tag.begin.js.jsx"
5814
},
5815
"2": {
5816
"name": "entity.name.tag.namespace.js.jsx"
5817
},
5818
"3": {
5819
"name": "punctuation.separator.namespace.js.jsx"
5820
},
5821
"4": {
5822
"name": "entity.name.tag.js.jsx"
5823
},
5824
"5": {
5825
"name": "support.class.component.js.jsx"
5826
}
5827
},
5828
"end": "(?=[/]?>)",
5829
"patterns": [
5830
{
5831
"include": "#comment"
5832
},
5833
{
5834
"include": "#type-arguments"
5835
},
5836
{
5837
"include": "#jsx-tag-attributes"
5838
}
5839
]
5840
},
5841
{
5842
"begin": "(>)",
5843
"beginCaptures": {
5844
"1": {
5845
"name": "punctuation.definition.tag.end.js.jsx"
5846
}
5847
},
5848
"end": "(?=</)",
5849
"contentName": "meta.jsx.children.js.jsx",
5850
"patterns": [
5851
{
5852
"include": "#jsx-children"
5853
}
5854
]
5855
}
5856
]
5857
},
5858
"jsx-children": {
5859
"patterns": [
5860
{
5861
"include": "#jsx-tag-without-attributes"
5862
},
5863
{
5864
"include": "#jsx-tag"
5865
},
5866
{
5867
"include": "#jsx-evaluated-code"
5868
},
5869
{
5870
"include": "#jsx-entities"
5871
}
5872
]
5873
},
5874
"jsx-evaluated-code": {
5875
"contentName": "meta.embedded.expression.js.jsx",
5876
"begin": "\\{",
5877
"end": "\\}",
5878
"beginCaptures": {
5879
"0": {
5880
"name": "punctuation.section.embedded.begin.js.jsx"
5881
}
5882
},
5883
"endCaptures": {
5884
"0": {
5885
"name": "punctuation.section.embedded.end.js.jsx"
5886
}
5887
},
5888
"patterns": [
5889
{
5890
"include": "#expression"
5891
}
5892
]
5893
},
5894
"jsx-entities": {
5895
"patterns": [
5896
{
5897
"name": "constant.character.entity.js.jsx",
5898
"match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
5899
"captures": {
5900
"1": {
5901
"name": "punctuation.definition.entity.js.jsx"
5902
},
5903
"3": {
5904
"name": "punctuation.definition.entity.js.jsx"
5905
}
5906
}
5907
}
5908
]
5909
},
5910
"jsx-tag-attributes": {
5911
"name": "meta.tag.attributes.js.jsx",
5912
"begin": "\\s+",
5913
"end": "(?=[/]?>)",
5914
"patterns": [
5915
{
5916
"include": "#comment"
5917
},
5918
{
5919
"include": "#jsx-tag-attribute-name"
5920
},
5921
{
5922
"include": "#jsx-tag-attribute-assignment"
5923
},
5924
{
5925
"include": "#jsx-string-double-quoted"
5926
},
5927
{
5928
"include": "#jsx-string-single-quoted"
5929
},
5930
{
5931
"include": "#jsx-evaluated-code"
5932
},
5933
{
5934
"include": "#jsx-tag-attributes-illegal"
5935
}
5936
]
5937
},
5938
"jsx-tag-attribute-name": {
5939
"match": "(?x)\n \\s*\n (?:([_$[:alpha:]][-_$[:alnum:].]*)(:))?\n ([_$[:alpha:]][-_$[:alnum:]]*)\n (?=\\s|=|/?>|/\\*|//)",
5940
"captures": {
5941
"1": {
5942
"name": "entity.other.attribute-name.namespace.js.jsx"
5943
},
5944
"2": {
5945
"name": "punctuation.separator.namespace.js.jsx"
5946
},
5947
"3": {
5948
"name": "entity.other.attribute-name.js.jsx"
5949
}
5950
}
5951
},
5952
"jsx-tag-attribute-assignment": {
5953
"name": "keyword.operator.assignment.js.jsx",
5954
"match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))"
5955
},
5956
"jsx-string-double-quoted": {
5957
"name": "string.quoted.double.js.jsx",
5958
"begin": "\"",
5959
"end": "\"",
5960
"beginCaptures": {
5961
"0": {
5962
"name": "punctuation.definition.string.begin.js.jsx"
5963
}
5964
},
5965
"endCaptures": {
5966
"0": {
5967
"name": "punctuation.definition.string.end.js.jsx"
5968
}
5969
},
5970
"patterns": [
5971
{
5972
"include": "#jsx-entities"
5973
}
5974
]
5975
},
5976
"jsx-string-single-quoted": {
5977
"name": "string.quoted.single.js.jsx",
5978
"begin": "'",
5979
"end": "'",
5980
"beginCaptures": {
5981
"0": {
5982
"name": "punctuation.definition.string.begin.js.jsx"
5983
}
5984
},
5985
"endCaptures": {
5986
"0": {
5987
"name": "punctuation.definition.string.end.js.jsx"
5988
}
5989
},
5990
"patterns": [
5991
{
5992
"include": "#jsx-entities"
5993
}
5994
]
5995
},
5996
"jsx-tag-attributes-illegal": {
5997
"name": "invalid.illegal.attribute.js.jsx",
5998
"match": "\\S+"
5999
}
6000
}
6001
}
6002