github-linguist 4.8.15 → 4.8.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/grammars/hint.haskell.json +206 -58
  3. data/grammars/hint.message.haskell.json +206 -58
  4. data/grammars/hint.type.haskell.json +206 -58
  5. data/grammars/source.actionscript.3.json +20 -22
  6. data/grammars/source.bsl.json +41 -9
  7. data/grammars/source.c++.json +2 -2
  8. data/grammars/source.clojure.json +3 -2
  9. data/grammars/source.coffee.json +32 -50
  10. data/grammars/source.crystal.json +21 -9
  11. data/grammars/source.cs.json +6 -0
  12. data/grammars/source.css.less.json +11 -11
  13. data/grammars/source.elixir.json +3 -3
  14. data/grammars/source.emacs.lisp.json +105 -11
  15. data/grammars/source.gfm.json +147 -0
  16. data/grammars/source.haskell.json +202 -147
  17. data/grammars/source.js.embedded.html.json +10 -0
  18. data/grammars/source.js.json +73 -26
  19. data/grammars/source.lean.json +8 -4
  20. data/grammars/source.litcoffee.json +1 -0
  21. data/grammars/source.mql5.json +214 -0
  22. data/grammars/source.objc.json +1 -1
  23. data/grammars/source.pic.json +67 -22
  24. data/grammars/source.python.json +6 -6
  25. data/grammars/source.sdbl.json +1 -1
  26. data/grammars/source.shell.json +1 -1
  27. data/grammars/source.sqf.json +5 -1
  28. data/grammars/source.swift.json +2564 -707
  29. data/grammars/source.ts.json +2581 -702
  30. data/grammars/source.tsx.json +2779 -841
  31. data/grammars/source.yaml.json +2 -2
  32. data/grammars/text.html.asdoc.json +0 -2
  33. data/grammars/text.html.handlebars.json +1 -1
  34. data/grammars/text.restructuredtext.json +37 -8
  35. data/grammars/text.roff.json +9 -1
  36. data/grammars/text.shell-session.json +1 -1
  37. data/grammars/text.tex.latex.haskell.json +207 -152
  38. data/grammars/text.xml.flex-config.json +0 -2
  39. data/lib/linguist/heuristics.rb +2 -2
  40. data/lib/linguist/languages.json +1 -1
  41. data/lib/linguist/languages.yml +85 -32
  42. data/lib/linguist/samples.json +2046 -114
  43. data/lib/linguist/vendor.yml +6 -0
  44. data/lib/linguist/version.rb +1 -1
  45. metadata +7 -5
@@ -1,175 +1,299 @@
1
1
  {
2
+ "name": "TypeScriptReact",
3
+ "scopeName": "source.tsx",
2
4
  "fileTypes": [
3
5
  "tsx"
4
6
  ],
5
- "name": "TypeScriptReact",
7
+ "uuid": "805375ec-d614-41f5-8993-5843fe63ea82",
6
8
  "patterns": [
7
9
  {
8
- "include": "#expression"
10
+ "include": "#statements"
9
11
  }
10
12
  ],
11
13
  "repository": {
12
- "access-modifier": {
13
- "match": "\\b(public|protected|private)\\b",
14
- "name": "storage.modifier.tsx"
15
- },
16
- "arithmetic-operator": {
17
- "match": "\\*|/|\\-\\-|\\-|\\+\\+|\\+|%",
18
- "name": "keyword.operator.arithmetic.tsx"
19
- },
20
- "array-literal": {
21
- "begin": "\\[",
22
- "beginCaptures": {
23
- "0": {
24
- "name": "meta.brace.square.tsx"
25
- }
26
- },
27
- "end": "\\]",
28
- "endCaptures": {
29
- "0": {
30
- "name": "meta.brace.square.tsx"
31
- }
32
- },
33
- "name": "meta.array.literal.tsx",
14
+ "statements": {
34
15
  "patterns": [
16
+ {
17
+ "include": "#string"
18
+ },
19
+ {
20
+ "include": "#regex"
21
+ },
22
+ {
23
+ "include": "#template"
24
+ },
25
+ {
26
+ "include": "#comment"
27
+ },
28
+ {
29
+ "include": "#literal"
30
+ },
31
+ {
32
+ "include": "#declaration"
33
+ },
34
+ {
35
+ "include": "#switch-statement"
36
+ },
37
+ {
38
+ "include": "#for-loop"
39
+ },
40
+ {
41
+ "include": "#after-operator-block"
42
+ },
43
+ {
44
+ "include": "#decl-block"
45
+ },
46
+ {
47
+ "include": "#control-statement"
48
+ },
35
49
  {
36
50
  "include": "#expression"
51
+ },
52
+ {
53
+ "include": "#punctuation-semicolon"
37
54
  }
38
55
  ]
39
56
  },
40
- "assignment-operator": {
41
- "match": "<<=|>>>=|>>=|\\*=|(?<!\\()/=|%=|\\+=|\\-=|&=|\\^=",
42
- "name": "keyword.operator.assignment.tsx"
43
- },
44
- "await-modifier": {
45
- "match": "\\bawait\\b",
46
- "name": "storage.modifier.tsx"
47
- },
48
- "block": {
49
- "begin": "\\{",
57
+ "var-expr": {
58
+ "name": "meta.var.expr.tsx",
59
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(var|let|const(?!\\s+enum\\b))\\b(?!\\$)",
50
60
  "beginCaptures": {
51
- "0": {
52
- "name": "meta.brace.curly.tsx"
53
- }
54
- },
55
- "end": "\\}",
56
- "endCaptures": {
57
- "0": {
58
- "name": "meta.brace.curly.tsx"
61
+ "1": {
62
+ "name": "keyword.control.export.tsx"
63
+ },
64
+ "2": {
65
+ "name": "storage.type.tsx"
59
66
  }
60
67
  },
61
- "name": "meta.block.tsx",
68
+ "end": "(?=$|;|}|(\\s+(of|in)\\s+))",
62
69
  "patterns": [
63
70
  {
64
- "include": "#object-member"
71
+ "include": "#destructuring-variable"
65
72
  },
66
73
  {
67
- "include": "#expression"
74
+ "include": "#var-single-variable"
75
+ },
76
+ {
77
+ "include": "#variable-initializer"
78
+ },
79
+ {
80
+ "include": "#comment"
81
+ },
82
+ {
83
+ "include": "#punctuation-comma"
68
84
  }
69
85
  ]
70
86
  },
71
- "boolean-literal": {
72
- "match": "\\b(false|true)\\b",
73
- "name": "constant.language.boolean.tsx"
74
- },
75
- "case-clause": {
76
- "begin": "(?<!\\.)\\b(case|default(?=:))\\b",
87
+ "var-single-variable": {
88
+ "name": "meta.var-single-variable.expr.tsx",
89
+ "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
77
90
  "beginCaptures": {
78
91
  "1": {
79
- "name": "keyword.control.tsx"
92
+ "name": "meta.definition.variable.tsx variable.other.readwrite.tsx"
80
93
  }
81
94
  },
82
- "end": ":",
83
- "name": "case-clause.expr.tsx",
95
+ "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
84
96
  "patterns": [
85
97
  {
86
- "include": "#expression-type"
98
+ "include": "#type-annotation"
99
+ },
100
+ {
101
+ "include": "#string"
102
+ },
103
+ {
104
+ "include": "#comment"
87
105
  }
88
106
  ]
89
107
  },
90
- "comment": {
91
- "name": "comment.tsx",
108
+ "destructuring-variable": {
109
+ "patterns": [
110
+ {
111
+ "name": "meta.object-binding-pattern-variable.tsx",
112
+ "begin": "(?<!=|:|of|in)\\s*(?=\\{)",
113
+ "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
114
+ "patterns": [
115
+ {
116
+ "include": "#object-binding-pattern"
117
+ },
118
+ {
119
+ "include": "#type-annotation"
120
+ },
121
+ {
122
+ "include": "#comment"
123
+ }
124
+ ]
125
+ },
126
+ {
127
+ "name": "meta.array-binding-pattern-variable.tsx",
128
+ "begin": "(?<!=|:|of|in)\\s*(?=\\[)",
129
+ "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
130
+ "patterns": [
131
+ {
132
+ "include": "#array-binding-pattern"
133
+ },
134
+ {
135
+ "include": "#type-annotation"
136
+ },
137
+ {
138
+ "include": "#comment"
139
+ }
140
+ ]
141
+ }
142
+ ]
143
+ },
144
+ "object-binding-element": {
92
145
  "patterns": [
93
146
  {
94
- "include": "#comment-block-doc"
147
+ "include": "#comment"
148
+ },
149
+ {
150
+ "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)",
151
+ "beginCaptures": {
152
+ "1": {
153
+ "name": "variable.object.property.tsx"
154
+ },
155
+ "2": {
156
+ "name": "punctuation.destructuring.tsx"
157
+ }
158
+ },
159
+ "end": "(?=,|\\})",
160
+ "patterns": [
161
+ {
162
+ "include": "#object-binding-pattern"
163
+ },
164
+ {
165
+ "include": "#array-binding-pattern"
166
+ },
167
+ {
168
+ "name": "meta.definition.variable.tsx variable.other.readwrite.tsx",
169
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)"
170
+ },
171
+ {
172
+ "include": "#variable-initializer"
173
+ }
174
+ ]
175
+ },
176
+ {
177
+ "include": "#object-binding-pattern"
178
+ },
179
+ {
180
+ "include": "#destructuring-variable-rest"
95
181
  },
96
182
  {
97
- "include": "#comment-block"
183
+ "include": "#variable-initializer"
98
184
  },
99
185
  {
100
- "include": "#comment-line"
186
+ "include": "#punctuation-comma"
101
187
  }
102
188
  ]
103
189
  },
104
- "comment-block": {
105
- "begin": "/\\*",
106
- "end": "\\*/",
107
- "name": "comment.block.tsx"
108
- },
109
- "comment-block-doc": {
110
- "begin": "/\\*\\*(?!/)",
111
- "end": "\\*/",
112
- "name": "comment.block.documentation.tsx"
113
- },
114
- "comment-line": {
115
- "match": "(//).*$\\n?",
116
- "name": "comment.line.tsx"
190
+ "array-binding-element": {
191
+ "patterns": [
192
+ {
193
+ "include": "#comment"
194
+ },
195
+ {
196
+ "include": "#object-binding-pattern"
197
+ },
198
+ {
199
+ "include": "#array-binding-pattern"
200
+ },
201
+ {
202
+ "include": "#destructuring-variable-rest"
203
+ },
204
+ {
205
+ "include": "#variable-initializer"
206
+ },
207
+ {
208
+ "include": "#punctuation-comma"
209
+ }
210
+ ]
117
211
  },
118
- "control-statement": {
119
- "match": "(?<!\\.)\\b(break|catch|continue|debugger|declare|do|else|finally|for|if|return|switch|throw|try|while|with|super|case|default|yield)\\b",
120
- "name": "keyword.control.tsx"
212
+ "destructuring-variable-rest": {
213
+ "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
214
+ "captures": {
215
+ "1": {
216
+ "name": "keyword.operator.rest.tsx"
217
+ },
218
+ "2": {
219
+ "name": "meta.definition.variable.tsx variable.other.readwrite.tsx"
220
+ }
221
+ }
121
222
  },
122
- "decl-block": {
123
- "begin": "\\{",
223
+ "object-binding-pattern": {
224
+ "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
124
225
  "beginCaptures": {
125
- "0": {
126
- "name": "meta.brace.curly.tsx"
226
+ "1": {
227
+ "name": "keyword.operator.rest.tsx"
228
+ },
229
+ "2": {
230
+ "name": "punctuation.definition.binding-pattern.object.tsx"
127
231
  }
128
232
  },
129
233
  "end": "\\}",
130
234
  "endCaptures": {
131
235
  "0": {
132
- "name": "meta.brace.curly.tsx"
236
+ "name": "punctuation.definition.binding-pattern.object.tsx"
133
237
  }
134
238
  },
135
- "name": "meta.decl.block.tsx",
136
239
  "patterns": [
137
240
  {
138
- "include": "#expression"
241
+ "include": "#object-binding-element"
139
242
  }
140
243
  ]
141
244
  },
142
- "declaration": {
143
- "name": "meta.declaration.tsx",
144
- "patterns": [
145
- {
146
- "include": "#function-declaration"
245
+ "array-binding-pattern": {
246
+ "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
247
+ "beginCaptures": {
248
+ "1": {
249
+ "name": "keyword.operator.rest.tsx"
147
250
  },
251
+ "2": {
252
+ "name": "punctuation.definition.binding-pattern.array.tsx"
253
+ }
254
+ },
255
+ "end": "\\]",
256
+ "endCaptures": {
257
+ "0": {
258
+ "name": "punctuation.definition.binding-pattern.array.tsx"
259
+ }
260
+ },
261
+ "patterns": [
148
262
  {
149
- "include": "#object-declaration"
150
- },
263
+ "include": "#array-binding-element"
264
+ }
265
+ ]
266
+ },
267
+ "ternary-expression": {
268
+ "begin": "(?=\\?)",
269
+ "end": "(?=$|[;,})\\]])",
270
+ "patterns": [
151
271
  {
152
- "include": "#type-declaration"
272
+ "include": "#ternary-operator"
153
273
  },
154
274
  {
155
- "include": "#enum-declaration"
275
+ "include": "#expression"
156
276
  }
157
277
  ]
158
278
  },
159
- "enum-declaration": {
160
- "captures": {
161
- "1": {
162
- "name": "storage.modifier.tsx"
163
- },
164
- "2": {
165
- "name": "storage.type.tsx"
166
- },
167
- "3": {
168
- "name": "entity.name.class.tsx"
279
+ "ternary-operator": {
280
+ "begin": "(\\?)",
281
+ "beginCaptures": {
282
+ "0": {
283
+ "name": "keyword.operator.ternary.tsx"
284
+ }
285
+ },
286
+ "end": "(:)",
287
+ "endCaptures": {
288
+ "0": {
289
+ "name": "keyword.operator.ternary.tsx"
169
290
  }
170
291
  },
171
- "match": "(?:\\b(const)\\s+)?\\b(enum)\\s+([a-zA-Z_$][\\w$]*)",
172
- "name": "meta.enum.declaration.tsx"
292
+ "patterns": [
293
+ {
294
+ "include": "#expression"
295
+ }
296
+ ]
173
297
  },
174
298
  "expression": {
175
299
  "name": "meta.expression.tsx",
@@ -177,9 +301,6 @@
177
301
  {
178
302
  "include": "#jsx"
179
303
  },
180
- {
181
- "include": "#for-in-simple"
182
- },
183
304
  {
184
305
  "include": "#string"
185
306
  },
@@ -196,573 +317,778 @@
196
317
  "include": "#literal"
197
318
  },
198
319
  {
199
- "include": "#paren-expression"
200
- },
201
- {
202
- "include": "#var-expr"
203
- },
204
- {
205
- "include": "#declaration"
206
- },
207
- {
208
- "include": "#new-expr"
209
- },
210
- {
211
- "include": "#switch-statement"
320
+ "include": "#function-declaration"
212
321
  },
213
322
  {
214
- "include": "#block"
323
+ "include": "#class-or-interface-declaration"
215
324
  },
216
325
  {
217
- "include": "#import-operator"
326
+ "include": "#arrow-function"
218
327
  },
219
328
  {
220
- "include": "#expression-operator"
329
+ "include": "#cast"
221
330
  },
222
331
  {
223
- "include": "#imply-operator"
332
+ "include": "#ternary-expression"
224
333
  },
225
334
  {
226
- "include": "#relational-operator"
335
+ "include": "#new-expr"
227
336
  },
228
337
  {
229
- "include": "#arithmetic-operator"
338
+ "include": "#object-literal"
230
339
  },
231
340
  {
232
- "include": "#logic-operator"
341
+ "include": "#expression-operators"
233
342
  },
234
343
  {
235
- "include": "#assignment-operator"
344
+ "include": "#support-objects"
236
345
  },
237
346
  {
238
- "include": "#storage-keyword"
347
+ "include": "#function-call"
239
348
  },
240
349
  {
241
- "include": "#type-primitive"
350
+ "include": "#identifiers"
242
351
  },
243
352
  {
244
- "include": "#function-call"
353
+ "include": "#paren-expression"
245
354
  },
246
355
  {
247
- "include": "#case-clause"
356
+ "include": "#punctuation-comma"
248
357
  },
249
358
  {
250
- "include": "#control-statement"
359
+ "include": "#punctuation-accessor"
251
360
  }
252
361
  ]
253
362
  },
254
- "expression-operator": {
255
- "match": "\\b(delete|in|instanceof|new|typeof|as|is|of)\\b",
256
- "name": "keyword.others.tsx"
257
- },
258
- "expression-type": {
259
- "name": "meta.expression.tsx",
363
+ "control-statement": {
260
364
  "patterns": [
261
365
  {
262
- "include": "#string"
366
+ "name": "keyword.control.trycatch.tsx",
367
+ "match": "(?<!\\.|\\$)\\b(catch|finally|throw|try)\\b(?!\\$)"
263
368
  },
264
369
  {
265
- "include": "#regex"
370
+ "name": "keyword.control.loop.tsx",
371
+ "match": "(?<!\\.|\\$)\\b(break|continue|do|goto|while)\\b(?!\\$)"
266
372
  },
267
373
  {
268
- "include": "#template"
374
+ "name": "keyword.control.flow.tsx",
375
+ "match": "(?<!\\.|\\$)\\b(return)\\b(?!\\$)"
269
376
  },
270
377
  {
271
- "include": "#comment"
378
+ "match": "(?<!\\.|\\$)\\b(yield)\\b(?!\\$)(?:\\s*(\\*))?",
379
+ "captures": {
380
+ "1": {
381
+ "name": "keyword.control.flow.tsx"
382
+ },
383
+ "2": {
384
+ "name": "keyword.generator.asterisk.tsx"
385
+ }
386
+ }
272
387
  },
273
388
  {
274
- "include": "#literal"
389
+ "name": "keyword.control.switch.tsx",
390
+ "match": "(?<!\\.|\\$)\\b(case|default|switch)\\b(?!\\$)"
275
391
  },
276
392
  {
277
- "include": "#paren-expression"
393
+ "name": "keyword.control.conditional.tsx",
394
+ "match": "(?<!\\.|\\$)\\b(else|if)\\b(?!\\$)"
278
395
  },
279
396
  {
280
- "include": "#ternary-expression"
397
+ "name": "keyword.control.with.tsx",
398
+ "match": "(?<!\\.|\\$)\\b(with)\\b(?!\\$)"
281
399
  },
282
400
  {
283
- "include": "#import-operator"
401
+ "name": "keyword.other.debugger.tsx",
402
+ "match": "(?<!\\.|\\$)\\b(debugger)\\b(?!\\$)"
284
403
  },
285
404
  {
286
- "include": "#expression-operator"
405
+ "name": "storage.modifier.tsx",
406
+ "match": "(?<!\\.|\\$)\\b(declare)\\b(?!\\$)"
407
+ }
408
+ ]
409
+ },
410
+ "declaration": {
411
+ "name": "meta.declaration.tsx",
412
+ "patterns": [
413
+ {
414
+ "include": "#decorator"
287
415
  },
288
416
  {
289
- "include": "#imply-operator"
417
+ "include": "#var-expr"
290
418
  },
291
419
  {
292
- "include": "#relational-operator"
420
+ "include": "#function-declaration"
293
421
  },
294
422
  {
295
- "include": "#arithmetic-operator"
423
+ "include": "#class-or-interface-declaration"
296
424
  },
297
425
  {
298
- "include": "#logic-operator"
426
+ "include": "#type-declaration"
299
427
  },
300
428
  {
301
- "include": "#assignment-operator"
429
+ "include": "#enum-declaration"
302
430
  },
303
431
  {
304
- "include": "#type-primitive"
432
+ "include": "#namespace-declaration"
305
433
  },
306
434
  {
307
- "include": "#function-call"
435
+ "include": "#import-equals-declaration"
436
+ },
437
+ {
438
+ "include": "#import-declaration"
439
+ },
440
+ {
441
+ "include": "#export-declaration"
308
442
  }
309
443
  ]
310
444
  },
311
- "field-declaration": {
312
- "begin": "(?<!\\()\\s*((?:\\b[a-zA-Z_$][\\w$]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\"))\\s*(\\?\\s*)?(?=(=|:))",
445
+ "decorator": {
446
+ "name": "meta.decorator.tsx",
447
+ "begin": "(?<!\\.|\\$)\\@",
313
448
  "beginCaptures": {
314
- "1": {
315
- "name": "variable.tsx"
316
- },
317
- "2": {
318
- "name": "keyword.others.tsx"
449
+ "0": {
450
+ "name": "punctuation.decorator.tsx"
319
451
  }
320
452
  },
321
- "end": "(?=\\}|;|,|$)|(?<=\\})",
322
- "name": "meta.field.declaration.tsx",
453
+ "end": "(?=\\s)",
323
454
  "patterns": [
324
455
  {
325
456
  "include": "#expression"
326
457
  }
327
458
  ]
328
459
  },
329
- "for-in-simple": {
330
- "captures": {
460
+ "type-declaration": {
461
+ "name": "meta.type.declaration.tsx",
462
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*",
463
+ "beginCaptures": {
331
464
  "1": {
332
- "name": "storage.type.tsx"
465
+ "name": "keyword.control.export.tsx"
466
+ },
467
+ "2": {
468
+ "name": "storage.type.type.tsx"
333
469
  },
334
470
  "3": {
335
- "name": "keyword.others.tsx"
471
+ "name": "entity.name.type.tsx"
336
472
  }
337
473
  },
338
- "match": "(?<=\\()\\s*\\b(var|let|const)\\s+([a-zA-Z_$][\\w$]*)\\s+(in|of)\\b",
339
- "name": "forin.expr.tsx"
340
- },
341
- "function-call": {
342
- "name": "functioncall.expr.tsx",
474
+ "end": "(?=[};]|\\bvar\\b|\\blet\\b|\\bconst\\b|\\btype\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\bnamespace\\b|\\bmodule\\b|\\bimport\\b|\\benum\\b|\\bdeclare\\b|\\bexport\\b|\\babstract\\b|\\basync\\b)",
343
475
  "patterns": [
344
476
  {
345
- "include": "#await-modifier"
477
+ "include": "#comment"
346
478
  },
347
479
  {
348
480
  "include": "#type-parameters"
349
481
  },
350
482
  {
351
- "include": "#paren-expression"
483
+ "include": "#type"
484
+ },
485
+ {
486
+ "match": "(=)\\s*",
487
+ "captures": {
488
+ "1": {
489
+ "name": "keyword.operator.assignment.tsx"
490
+ }
491
+ }
352
492
  }
353
493
  ]
354
494
  },
355
- "function-declaration": {
356
- "begin": "\\b(?:(export)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s+([a-zA-Z_$][\\w$]*))?\\s*",
495
+ "enum-declaration": {
496
+ "name": "meta.enum.declaration.tsx",
497
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
357
498
  "beginCaptures": {
358
499
  "1": {
359
- "name": "storage.type.tsx"
500
+ "name": "keyword.control.export.tsx"
360
501
  },
361
502
  "2": {
362
503
  "name": "storage.modifier.tsx"
363
504
  },
364
505
  "3": {
365
- "name": "storage.type.function.tsx"
506
+ "name": "storage.type.enum.tsx"
366
507
  },
367
508
  "4": {
368
- "name": "entity.name.function.tsx"
509
+ "name": "entity.name.type.enum.tsx"
369
510
  }
370
511
  },
371
- "end": "(?=;|\\})|(?<=\\})",
372
- "name": "meta.function.tsx",
512
+ "end": "(?<=\\})",
373
513
  "patterns": [
374
514
  {
375
515
  "include": "#comment"
376
516
  },
377
517
  {
378
- "include": "#type-parameters"
379
- },
380
- {
381
- "include": "#function-type-parameters"
382
- },
383
- {
384
- "include": "#return-type"
385
- },
386
- {
387
- "include": "#function-overload-declaration"
388
- },
389
- {
390
- "include": "#decl-block"
518
+ "begin": "\\{",
519
+ "beginCaptures": {
520
+ "0": {
521
+ "name": "punctuation.definition.block.tsx"
522
+ }
523
+ },
524
+ "end": "\\}",
525
+ "endCaptures": {
526
+ "0": {
527
+ "name": "punctuation.definition.block.tsx"
528
+ }
529
+ },
530
+ "patterns": [
531
+ {
532
+ "include": "#comment"
533
+ },
534
+ {
535
+ "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
536
+ "beginCaptures": {
537
+ "0": {
538
+ "name": "variable.other.enummember.tsx"
539
+ }
540
+ },
541
+ "end": "(?=,|\\}|$)",
542
+ "patterns": [
543
+ {
544
+ "include": "#comment"
545
+ },
546
+ {
547
+ "include": "#variable-initializer"
548
+ }
549
+ ]
550
+ },
551
+ {
552
+ "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")))",
553
+ "end": "(?=,|\\}|$)",
554
+ "patterns": [
555
+ {
556
+ "include": "#string"
557
+ },
558
+ {
559
+ "include": "#comment"
560
+ },
561
+ {
562
+ "include": "#variable-initializer"
563
+ }
564
+ ]
565
+ },
566
+ {
567
+ "include": "#punctuation-comma"
568
+ }
569
+ ]
391
570
  }
392
571
  ]
393
572
  },
394
- "function-overload-declaration": {
395
- "captures": {
573
+ "namespace-declaration": {
574
+ "name": "meta.namespace.declaration.tsx",
575
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(namespace|module)\\s+",
576
+ "beginCaptures": {
396
577
  "1": {
397
- "name": "storage.type.tsx"
578
+ "name": "keyword.control.export.tsx"
398
579
  },
399
580
  "2": {
400
- "name": "storage.type.function.tsx"
401
- },
402
- "3": {
403
- "name": "entity.name.function.tsx"
404
- }
405
- },
406
- "match": "\\b(?:(export)\\s+)?(function\\b)(?:\\s+([a-zA-Z_$][\\w$]*))?\\s*",
407
- "name": "meta.function.overload.tsx"
408
- },
409
- "function-type-parameters": {
410
- "begin": "\\(",
411
- "beginCaptures": {
412
- "0": {
413
- "name": "meta.brace.round.tsx"
414
- }
415
- },
416
- "end": "\\)",
417
- "endCaptures": {
418
- "0": {
419
- "name": "meta.brace.round.tsx"
581
+ "name": "storage.type.namespace.tsx"
420
582
  }
421
583
  },
422
- "name": "meta.function.type.parameter.tsx",
584
+ "end": "(?=$|\\{)",
423
585
  "patterns": [
424
586
  {
425
587
  "include": "#comment"
426
588
  },
427
589
  {
428
- "include": "#parameter-name"
590
+ "include": "#string"
429
591
  },
430
592
  {
431
- "include": "#type-annotation"
593
+ "name": "entity.name.type.module.tsx",
594
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)"
432
595
  },
433
596
  {
434
- "include": "#variable-initializer"
597
+ "name": "punctuation.accessor.tsx",
598
+ "match": "\\."
435
599
  }
436
600
  ]
437
601
  },
438
- "imply-operator": {
439
- "match": "=>",
440
- "name": "keyword.operator.tsx"
441
- },
442
- "import-operator": {
443
- "match": "\\b(import|from)\\b",
444
- "name": "keyword.control.import.include.tsx"
602
+ "import-equals-declaration": {
603
+ "patterns": [
604
+ {
605
+ "name": "meta.import-equals.external.tsx",
606
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()",
607
+ "beginCaptures": {
608
+ "1": {
609
+ "name": "keyword.control.export.tsx"
610
+ },
611
+ "2": {
612
+ "name": "keyword.control.import.tsx"
613
+ },
614
+ "3": {
615
+ "name": "variable.other.readwrite.alias.tsx"
616
+ },
617
+ "4": {
618
+ "name": "keyword.operator.assignment.tsx"
619
+ },
620
+ "5": {
621
+ "name": "keyword.control.require.tsx"
622
+ },
623
+ "6": {
624
+ "name": "meta.brace.round.tsx"
625
+ }
626
+ },
627
+ "end": "\\)",
628
+ "endCaptures": {
629
+ "0": {
630
+ "name": "meta.brace.round.tsx"
631
+ }
632
+ },
633
+ "patterns": [
634
+ {
635
+ "include": "#comment"
636
+ },
637
+ {
638
+ "include": "#string"
639
+ }
640
+ ]
641
+ },
642
+ {
643
+ "name": "meta.import-equals.internal.tsx",
644
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(?!require\\b)",
645
+ "beginCaptures": {
646
+ "1": {
647
+ "name": "keyword.control.export.tsx"
648
+ },
649
+ "2": {
650
+ "name": "keyword.control.import.tsx"
651
+ },
652
+ "3": {
653
+ "name": "variable.other.readwrite.alias.tsx"
654
+ },
655
+ "4": {
656
+ "name": "keyword.operator.assignment.tsx"
657
+ }
658
+ },
659
+ "end": "(?=;|$)",
660
+ "patterns": [
661
+ {
662
+ "include": "#comment"
663
+ },
664
+ {
665
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)",
666
+ "captures": {
667
+ "1": {
668
+ "name": "entity.name.type.module.tsx"
669
+ },
670
+ "2": {
671
+ "name": "punctuation.accessor.tsx"
672
+ }
673
+ }
674
+ },
675
+ {
676
+ "name": "variable.other.readwrite.tsx",
677
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)"
678
+ }
679
+ ]
680
+ }
681
+ ]
445
682
  },
446
- "indexer-declaration": {
447
- "begin": "\\[",
683
+ "import-declaration": {
684
+ "name": "meta.import.tsx",
685
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)(?!(\\s*:)|(\\$))\\b",
448
686
  "beginCaptures": {
449
- "0": {
450
- "name": "meta.brace.square.tsx"
451
- }
452
- },
453
- "end": "(\\])\\s*(\\?\\s*)?|$",
454
- "endCaptures": {
455
687
  "1": {
456
- "name": "meta.brace.square.tsx"
688
+ "name": "keyword.control.export.tsx"
457
689
  },
458
690
  "2": {
459
- "name": "keyword.others.tsx"
691
+ "name": "keyword.control.import.tsx"
460
692
  }
461
693
  },
462
- "name": "meta.indexer.declaration.tsx",
694
+ "end": "(?=;|$)",
463
695
  "patterns": [
464
696
  {
465
- "include": "#type-annotation"
466
- },
467
- {
468
- "include": "#indexer-parameter"
469
- },
470
- {
471
- "include": "#expression"
697
+ "include": "#import-export-declaration"
472
698
  }
473
699
  ]
474
700
  },
475
- "indexer-parameter": {
476
- "captures": {
477
- "1": {
478
- "name": "variable.parameter.tsx"
479
- }
480
- },
481
- "match": "([a-zA-Z_$][\\w$]*)(?=\\:)",
482
- "name": "meta.indexer.parameter.tsx"
483
- },
484
- "jsx": {
485
- "name": "meta.jsx.tsx",
701
+ "export-declaration": {
486
702
  "patterns": [
487
703
  {
488
- "include": "#jsx-tag-without-attributes"
489
- },
490
- {
491
- "include": "#jsx-tag-open"
492
- },
493
- {
494
- "include": "#jsx-tag-close"
704
+ "match": "(?<!\\.|\\$)\\b(export)\\s+(as)\\s+(namespace)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
705
+ "captures": {
706
+ "1": {
707
+ "name": "keyword.control.export.tsx"
708
+ },
709
+ "2": {
710
+ "name": "keyword.control.as.tsx"
711
+ },
712
+ "3": {
713
+ "name": "storage.type.namespace.tsx"
714
+ },
715
+ "4": {
716
+ "name": "entity.name.type.module.tsx"
717
+ }
718
+ }
495
719
  },
496
720
  {
497
- "include": "#jsx-tag-invalid"
721
+ "name": "meta.export.default.tsx",
722
+ "begin": "(?<!\\.|\\$)\\b(export)(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))",
723
+ "beginCaptures": {
724
+ "1": {
725
+ "name": "keyword.control.export.tsx"
726
+ },
727
+ "2": {
728
+ "name": "keyword.operator.assignment.tsx"
729
+ },
730
+ "3": {
731
+ "name": "keyword.control.default.tsx"
732
+ }
733
+ },
734
+ "end": "(?=;|\\bexport\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|\\bimport\\b|\\benum\\b|\\bnamespace\\b|\\bmodule\\b|\\btype\\b|\\babstract\\b|\\bdeclare\\b|\\basync\\b|$)",
735
+ "patterns": [
736
+ {
737
+ "include": "#expression"
738
+ }
739
+ ]
498
740
  },
499
741
  {
500
- "begin": "(?<=(?:'|\"|})>)",
501
- "end": "(?=</)",
502
- "name": "meta.jsx.children.tsx",
742
+ "name": "meta.export.tsx",
743
+ "begin": "(?<!\\.|\\$)\\b(export)(?!(\\s*:)|(\\$))\\b",
744
+ "beginCaptures": {
745
+ "0": {
746
+ "name": "keyword.control.export.tsx"
747
+ }
748
+ },
749
+ "end": "(?=;|\\bexport\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|\\bimport\\b|\\benum\\b|\\bnamespace\\b|\\bmodule\\b|\\btype\\b|\\babstract\\b|\\bdeclare\\b|\\basync\\b|$)",
503
750
  "patterns": [
504
751
  {
505
- "include": "#jsx-children"
752
+ "include": "#import-export-declaration"
506
753
  }
507
754
  ]
508
755
  }
509
756
  ]
510
757
  },
511
- "jsx-children": {
758
+ "import-export-declaration": {
512
759
  "patterns": [
513
760
  {
514
- "include": "#jsx-tag-without-attributes"
761
+ "include": "#comment"
515
762
  },
516
763
  {
517
- "include": "#jsx-tag-open"
764
+ "include": "#string"
518
765
  },
519
766
  {
520
- "include": "#jsx-tag-close"
767
+ "include": "#import-export-block"
521
768
  },
522
769
  {
523
- "include": "#jsx-tag-invalid"
770
+ "name": "keyword.control.from.tsx",
771
+ "match": "\\bfrom\\b"
524
772
  },
525
773
  {
526
- "include": "#jsx-evaluated-code"
527
- },
774
+ "include": "#import-export-clause"
775
+ }
776
+ ]
777
+ },
778
+ "import-export-block": {
779
+ "name": "meta.block.tsx",
780
+ "begin": "\\{",
781
+ "beginCaptures": {
782
+ "0": {
783
+ "name": "punctuation.definition.block.tsx"
784
+ }
785
+ },
786
+ "end": "\\}",
787
+ "endCaptures": {
788
+ "0": {
789
+ "name": "punctuation.definition.block.tsx"
790
+ }
791
+ },
792
+ "patterns": [
528
793
  {
529
- "include": "#jsx-entities"
794
+ "include": "#import-export-clause"
530
795
  }
531
796
  ]
532
797
  },
533
- "jsx-entities": {
798
+ "import-export-clause": {
534
799
  "patterns": [
535
800
  {
801
+ "include": "#comment"
802
+ },
803
+ {
804
+ "comment": "(default|*|name) as alias",
805
+ "match": "(?x) (?: \\b(default)\\b | (\\*) | ([_$[:alpha:]][_$[:alnum:]]*)) \\s+ (as) \\s+ (?: (\\b default \\b | \\*) | ([_$[:alpha:]][_$[:alnum:]]*))",
536
806
  "captures": {
537
807
  "1": {
538
- "name": "punctuation.definition.entity.tsx"
808
+ "name": "keyword.control.default.tsx"
809
+ },
810
+ "2": {
811
+ "name": "constant.language.import-export-all.tsx"
539
812
  },
540
813
  "3": {
541
- "name": "punctuation.definition.entity.tsx"
814
+ "name": "variable.other.readwrite.tsx"
815
+ },
816
+ "4": {
817
+ "name": "keyword.control.as.tsx"
818
+ },
819
+ "5": {
820
+ "name": "invalid.illegal.tsx"
821
+ },
822
+ "6": {
823
+ "name": "variable.other.readwrite.alias.tsx"
542
824
  }
543
- },
544
- "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
545
- "name": "constant.character.entity.tsx"
825
+ }
826
+ },
827
+ {
828
+ "include": "#punctuation-comma"
829
+ },
830
+ {
831
+ "name": "constant.language.import-export-all.tsx",
832
+ "match": "\\*"
546
833
  },
547
834
  {
548
- "match": "&",
549
- "name": "invalid.illegal.bad-ampersand.tsx"
835
+ "name": "keyword.control.default.tsx",
836
+ "match": "\\b(default)\\b"
837
+ },
838
+ {
839
+ "name": "variable.other.readwrite.alias.tsx",
840
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)"
550
841
  }
551
842
  ]
552
843
  },
553
- "jsx-evaluated-code": {
554
- "begin": "{",
844
+ "class-or-interface-declaration": {
845
+ "name": "meta.class.tsx",
846
+ "begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(?:(class)|(interface))\\b",
555
847
  "beginCaptures": {
556
- "0": {
557
- "name": "punctuation.definition.brace.curly.start.tsx"
848
+ "1": {
849
+ "name": "keyword.control.export.tsx"
850
+ },
851
+ "2": {
852
+ "name": "storage.modifier.tsx"
853
+ },
854
+ "3": {
855
+ "name": "storage.type.class.tsx"
856
+ },
857
+ "4": {
858
+ "name": "storage.type.interface.tsx"
558
859
  }
559
860
  },
560
- "end": "}",
861
+ "end": "(?<=\\})",
561
862
  "endCaptures": {
562
- "0": {
563
- "name": "punctuation.definition.brace.curly.end.tsx"
863
+ "1": {
864
+ "name": "punctuation.definition.block.tsx"
564
865
  }
565
866
  },
566
- "name": "meta.brace.curly.tsx",
567
867
  "patterns": [
568
868
  {
569
- "include": "#expression"
570
- }
571
- ]
572
- },
573
- "jsx-string-double-quoted": {
574
- "begin": "\"",
575
- "beginCaptures": {
576
- "0": {
577
- "name": "punctuation.definition.string.begin.tsx"
578
- }
579
- },
580
- "end": "\"",
581
- "endCaptures": {
582
- "0": {
583
- "name": "punctuation.definition.string.end.tsx"
584
- }
585
- },
586
- "name": "string.quoted.double.tsx",
587
- "patterns": [
869
+ "include": "#comment"
870
+ },
588
871
  {
589
- "include": "#jsx-entities"
872
+ "include": "#class-or-interface-heritage"
873
+ },
874
+ {
875
+ "match": "[_$[:alpha:]][_$[:alnum:]]*",
876
+ "captures": {
877
+ "0": {
878
+ "name": "entity.name.type.class.tsx"
879
+ }
880
+ }
881
+ },
882
+ {
883
+ "include": "#type-parameters"
884
+ },
885
+ {
886
+ "include": "#class-or-interface-body"
590
887
  }
591
888
  ]
592
889
  },
593
- "jsx-string-single-quoted": {
594
- "begin": "'",
890
+ "class-or-interface-heritage": {
891
+ "begin": "(?<!\\.|\\$)(?:\\b(extends|implements)\\b)(?!\\$)",
595
892
  "beginCaptures": {
596
- "0": {
597
- "name": "punctuation.definition.string.begin.tsx"
893
+ "1": {
894
+ "name": "storage.modifier.tsx"
598
895
  }
599
896
  },
600
- "end": "'",
897
+ "end": "(?=\\{)",
601
898
  "endCaptures": {
602
- "0": {
603
- "name": "punctuation.definition.string.end.tsx"
604
- }
605
- },
606
- "name": "string.quoted.single.tsx",
607
- "patterns": [
608
- {
609
- "include": "#jsx-entities"
610
- }
611
- ]
612
- },
613
- "jsx-tag-attribute-assignment": {
614
- "match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))",
615
- "name": "keyword.operator.assignment.tsx"
616
- },
617
- "jsx-tag-attribute-name": {
618
- "captures": {
619
899
  "1": {
620
- "name": "entity.other.attribute-name.tsx"
900
+ "name": "punctuation.definition.block.tsx"
621
901
  }
622
902
  },
623
- "match": "(?x)\n \\s*\n ([_$a-zA-Z][-$\\w]*)\n (?=\\s|=|/?>|/\\*|//)",
624
- "name": "meta.tag.attribute-name.tsx"
625
- },
626
- "jsx-tag-attributes": {
627
903
  "patterns": [
628
904
  {
629
- "include": "#jsx-tag-attribute-name"
905
+ "include": "#comment"
630
906
  },
631
907
  {
632
- "include": "#jsx-tag-attribute-assignment"
908
+ "include": "#class-or-interface-heritage"
633
909
  },
634
910
  {
635
- "include": "#jsx-string-double-quoted"
911
+ "include": "#type-parameters"
636
912
  },
637
913
  {
638
- "include": "#jsx-string-single-quoted"
914
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)",
915
+ "captures": {
916
+ "1": {
917
+ "name": "entity.name.type.module.tsx"
918
+ },
919
+ "2": {
920
+ "name": "punctuation.accessor.tsx"
921
+ }
922
+ }
639
923
  },
640
924
  {
641
- "include": "#jsx-evaluated-code"
925
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)",
926
+ "captures": {
927
+ "1": {
928
+ "name": "entity.other.inherited-class.tsx"
929
+ }
930
+ }
642
931
  }
643
932
  ]
644
933
  },
645
- "jsx-tag-attributes-illegal": {
646
- "match": "\\S+",
647
- "name": "invalid.illegal.attribute.tsx"
648
- },
649
- "jsx-tag-close": {
650
- "begin": "(</)([_$a-zA-Z][-$\\w.]*(?<!\\.|-))",
934
+ "class-or-interface-body": {
935
+ "begin": "\\{",
651
936
  "beginCaptures": {
652
- "1": {
653
- "name": "punctuation.definition.tag.begin.tsx"
654
- },
655
- "2": {
656
- "name": "entity.name.tag.tsx"
937
+ "0": {
938
+ "name": "punctuation.definition.block.tsx"
657
939
  }
658
940
  },
659
- "end": "(>)",
941
+ "end": "\\}",
660
942
  "endCaptures": {
661
- "1": {
662
- "name": "punctuation.definition.tag.end.tsx"
943
+ "0": {
944
+ "name": "punctuation.definition.block.tsx"
663
945
  }
664
946
  },
665
- "name": "tag.close.tsx",
666
947
  "patterns": [
667
948
  {
668
- "include": "#comment"
669
- }
670
- ]
671
- },
672
- "jsx-tag-invalid": {
673
- "match": "<\\s*>",
674
- "name": "invalid.illegal.tag.incomplete.tsx"
675
- },
676
- "jsx-tag-open": {
677
- "begin": "(?x)\n (<)\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>)",
678
- "beginCaptures": {
679
- "1": {
680
- "name": "punctuation.definition.tag.begin.tsx"
949
+ "include": "#string"
681
950
  },
682
- "2": {
683
- "name": "entity.name.tag.tsx"
684
- }
685
- },
686
- "end": "(/?>)",
687
- "endCaptures": {
688
- "1": {
689
- "name": "punctuation.definition.tag.end.tsx"
690
- }
691
- },
692
- "name": "tag.open.tsx",
693
- "patterns": [
694
951
  {
695
952
  "include": "#comment"
696
953
  },
697
954
  {
698
- "include": "#jsx-tag-attributes"
955
+ "include": "#decorator"
956
+ },
957
+ {
958
+ "include": "#method-declaration"
959
+ },
960
+ {
961
+ "include": "#indexer-declaration"
962
+ },
963
+ {
964
+ "include": "#field-declaration"
965
+ },
966
+ {
967
+ "include": "#type-annotation"
968
+ },
969
+ {
970
+ "include": "#variable-initializer"
971
+ },
972
+ {
973
+ "include": "#access-modifier"
974
+ },
975
+ {
976
+ "include": "#property-accessor"
977
+ },
978
+ {
979
+ "include": "#expression"
980
+ },
981
+ {
982
+ "include": "#punctuation-comma"
699
983
  },
700
984
  {
701
- "include": "#jsx-tag-attributes-illegal"
985
+ "include": "#punctuation-semicolon"
702
986
  }
703
987
  ]
704
988
  },
705
- "jsx-tag-without-attributes": {
706
- "begin": "(<)([_$a-zA-Z][-$\\w.]*(?<!\\.|-))(>)",
989
+ "type-object": {
990
+ "name": "meta.object.type.tsx",
991
+ "begin": "\\{",
707
992
  "beginCaptures": {
708
- "1": {
709
- "name": "punctuation.definition.tag.begin.tsx"
710
- },
711
- "2": {
712
- "name": "entity.name.tag.tsx"
713
- },
714
- "3": {
715
- "name": "punctuation.definition.tag.end.tsx"
993
+ "0": {
994
+ "name": "punctuation.definition.block.tsx"
716
995
  }
717
996
  },
718
- "end": "(</)([_$a-zA-Z][-$\\w.]*(?<!\\.|-))(>)",
997
+ "end": "\\}",
719
998
  "endCaptures": {
720
- "1": {
721
- "name": "punctuation.definition.tag.begin.tsx"
722
- },
723
- "2": {
724
- "name": "entity.name.tag.tsx"
725
- },
726
- "3": {
727
- "name": "punctuation.definition.tag.end.tsx"
999
+ "0": {
1000
+ "name": "punctuation.definition.block.tsx"
728
1001
  }
729
1002
  },
730
- "name": "tag.without-attributes.tsx",
731
1003
  "patterns": [
732
1004
  {
733
- "include": "#jsx-children"
1005
+ "include": "#type-object-members"
734
1006
  }
735
1007
  ]
736
1008
  },
737
- "literal": {
738
- "name": "literal.tsx",
1009
+ "type-object-members": {
739
1010
  "patterns": [
740
1011
  {
741
- "include": "#numeric-literal"
1012
+ "include": "#comment"
742
1013
  },
743
1014
  {
744
- "include": "#boolean-literal"
1015
+ "include": "#method-declaration"
745
1016
  },
746
1017
  {
747
- "include": "#null-literal"
1018
+ "include": "#indexer-declaration"
748
1019
  },
749
1020
  {
750
- "include": "#undefined-literal"
1021
+ "include": "#field-declaration"
751
1022
  },
752
1023
  {
753
- "include": "#array-literal"
1024
+ "include": "#type-annotation"
754
1025
  },
755
1026
  {
756
- "include": "#this-literal"
1027
+ "begin": "\\.\\.\\.",
1028
+ "beginCaptures": {
1029
+ "0": {
1030
+ "name": "keyword.operator.spread.tsx"
1031
+ }
1032
+ },
1033
+ "end": "(?=\\}|;|,|$)|(?<=\\})",
1034
+ "patterns": [
1035
+ {
1036
+ "include": "#type"
1037
+ }
1038
+ ]
1039
+ },
1040
+ {
1041
+ "include": "#punctuation-comma"
1042
+ },
1043
+ {
1044
+ "include": "#punctuation-semicolon"
757
1045
  }
758
1046
  ]
759
1047
  },
760
- "logic-operator": {
761
- "match": "\\!|&&|&|~|\\^|\\|\\||\\|",
762
- "name": "keyword.operator.arithmetic.tsx"
1048
+ "field-declaration": {
1049
+ "name": "meta.field.declaration.tsx",
1050
+ "begin": "(?<!\\()(?:(?<!\\.|\\$)\\b(readonly)\\s+)?(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[[^\\]]*\\]))\\s*(\\?\\s*)?(=|:))",
1051
+ "beginCaptures": {
1052
+ "1": {
1053
+ "name": "storage.modifier.tsx"
1054
+ }
1055
+ },
1056
+ "end": "(?=\\}|;|,|$)|(?<=\\})",
1057
+ "patterns": [
1058
+ {
1059
+ "include": "#variable-initializer"
1060
+ },
1061
+ {
1062
+ "begin": "(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(\\[[^\\]]*\\]))\\s*(\\?\\s*)?(=|:))",
1063
+ "end": "(?=[};,=]|$)|(?<=\\})",
1064
+ "patterns": [
1065
+ {
1066
+ "include": "#type-annotation"
1067
+ },
1068
+ {
1069
+ "include": "#string"
1070
+ },
1071
+ {
1072
+ "include": "#array-literal"
1073
+ },
1074
+ {
1075
+ "include": "#comment"
1076
+ },
1077
+ {
1078
+ "name": "meta.definition.property.tsx variable.object.property.tsx",
1079
+ "match": "[_$[:alpha:]][_$[:alnum:]]*"
1080
+ },
1081
+ {
1082
+ "name": "keyword.operator.optional.tsx",
1083
+ "match": "\\?"
1084
+ }
1085
+ ]
1086
+ }
1087
+ ]
763
1088
  },
764
1089
  "method-declaration": {
765
- "begin": "\\b(?:(abstract)\\s+)?\\b(?:(public|private|protected)\\s+)?\\b(?:(async)\\s+)?(?:(get|set)\\s+)?(?:(new)|(?:\\b(constructor)\\b)|(?:([a-zA-Z_$][\\.\\w$]*)\\s*(\\??)))?\\s*(?=\\(|\\<)",
1090
+ "name": "meta.method.declaration.tsx",
1091
+ "begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[[^\\]]*\\]))\\s*(\\??))?\\s*[\\(\\<]))",
766
1092
  "beginCaptures": {
767
1093
  "1": {
768
1094
  "name": "storage.modifier.tsx"
@@ -771,27 +1097,26 @@
771
1097
  "name": "storage.modifier.tsx"
772
1098
  },
773
1099
  "3": {
774
- "name": "storage.modifier.tsx"
1100
+ "name": "storage.modifier.async.tsx"
775
1101
  },
776
1102
  "4": {
777
1103
  "name": "storage.type.property.tsx"
778
1104
  },
779
1105
  "5": {
780
- "name": "keyword.operator.tsx"
1106
+ "name": "keyword.operator.new.tsx"
781
1107
  },
782
1108
  "6": {
783
1109
  "name": "storage.type.tsx"
784
1110
  },
785
1111
  "7": {
786
- "name": "entity.name.function.tsx"
787
- },
788
- "8": {
789
- "name": "keyword.operator.tsx"
1112
+ "name": "keyword.generator.asterisk.tsx"
790
1113
  }
791
1114
  },
792
1115
  "end": "(?=\\}|;|,)|(?<=\\})",
793
- "name": "meta.method.declaration.tsx",
794
1116
  "patterns": [
1117
+ {
1118
+ "include": "#method-declaration-name"
1119
+ },
795
1120
  {
796
1121
  "include": "#comment"
797
1122
  },
@@ -799,10 +1124,10 @@
799
1124
  "include": "#type-parameters"
800
1125
  },
801
1126
  {
802
- "include": "#function-type-parameters"
1127
+ "include": "#function-parameters"
803
1128
  },
804
1129
  {
805
- "include": "#type-annotation"
1130
+ "include": "#return-type"
806
1131
  },
807
1132
  {
808
1133
  "include": "#method-overload-declaration"
@@ -813,7 +1138,8 @@
813
1138
  ]
814
1139
  },
815
1140
  "method-overload-declaration": {
816
- "captures": {
1141
+ "begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[[^\\]]*\\]))\\s*(\\??))?\\s*[\\(\\<]))",
1142
+ "beginCaptures": {
817
1143
  "1": {
818
1144
  "name": "storage.modifier.tsx"
819
1145
  },
@@ -821,430 +1147,468 @@
821
1147
  "name": "storage.modifier.tsx"
822
1148
  },
823
1149
  "3": {
824
- "name": "storage.modifier.tsx"
1150
+ "name": "storage.modifier.async.tsx"
825
1151
  },
826
1152
  "4": {
827
1153
  "name": "storage.type.property.tsx"
828
1154
  },
829
1155
  "5": {
830
- "name": "keyword.operator.tsx"
1156
+ "name": "keyword.operator.new.tsx"
831
1157
  },
832
1158
  "6": {
833
1159
  "name": "storage.type.tsx"
834
1160
  },
835
1161
  "7": {
836
- "name": "entity.name.function.tsx"
837
- },
838
- "8": {
839
- "name": "keyword.operator.tsx"
840
- }
841
- },
842
- "match": "\\b(?:(abstract)\\s+)?\\b(?:(public|private|protected)\\s+)?\\b(?:(async)\\s+)?(?:(get|set)\\s+)?(?:(new)|(?:\\b(constructor)\\b)|(?:([a-zA-Z_$][\\.\\w$]*)\\s*(\\??)))?\\s*(?=\\(|\\<)",
843
- "name": "meta.method.overload.declaration.tsx"
844
- },
845
- "new-expr": {
846
- "begin": "\\b(new)\\b",
847
- "beginCaptures": {
848
- "1": {
849
- "name": "keyword.others.tsx"
1162
+ "name": "keyword.generator.asterisk.tsx"
850
1163
  }
851
1164
  },
852
- "end": "(?=[(;]|$)",
853
- "name": "new.expr.tsx",
1165
+ "end": "(?=\\(|\\<)",
854
1166
  "patterns": [
855
1167
  {
856
- "include": "#type"
857
- },
858
- {
859
- "include": "#comment"
1168
+ "include": "#method-declaration-name"
860
1169
  }
861
1170
  ]
862
1171
  },
863
- "null-literal": {
864
- "match": "\\b(null)\\b",
865
- "name": "constant.language.null.tsx"
866
- },
867
- "numeric-literal": {
868
- "match": "\\b(?<=[^$])((0(x|X)[0-9a-fA-F]+)|(0(o|O)[0-7]+)|(0(b|B)(0|1)+)|(([0-9]+(\\.[0-9]+)?))([eE]([+-]?)[0-9]+(\\.[0-9]+)?)?)\\b",
869
- "name": "constant.numeric.tsx"
870
- },
871
- "object-body": {
872
- "begin": "\\{",
873
- "beginCaptures": {
874
- "0": {
875
- "name": "meta.brace.curly.tsx"
876
- }
877
- },
878
- "end": "\\}",
879
- "endCaptures": {
880
- "0": {
881
- "name": "meta.brace.curly.tsx"
882
- }
883
- },
884
- "name": "meta.object.body.tsx",
1172
+ "method-declaration-name": {
1173
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[[^\\]]*\\]))\\s*(\\??)\\s*[\\(\\<])",
1174
+ "end": "(?=\\(|\\<)",
885
1175
  "patterns": [
886
1176
  {
887
1177
  "include": "#string"
888
1178
  },
889
1179
  {
890
- "include": "#comment"
1180
+ "include": "#array-literal"
891
1181
  },
892
1182
  {
893
- "include": "#field-declaration"
1183
+ "name": "meta.definition.method.tsx entity.name.function.tsx",
1184
+ "match": "[_$[:alpha:]][_$[:alnum:]]*"
894
1185
  },
895
1186
  {
896
- "include": "#method-declaration"
1187
+ "name": "keyword.operator.optional.tsx",
1188
+ "match": "\\?"
1189
+ }
1190
+ ]
1191
+ },
1192
+ "indexer-declaration": {
1193
+ "name": "meta.indexer.declaration.tsx",
1194
+ "begin": "(?:(?<!\\.|\\$)\\b(readonly)\\s*)?(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)",
1195
+ "beginCaptures": {
1196
+ "1": {
1197
+ "name": "storage.modifier.tsx"
897
1198
  },
898
- {
899
- "include": "#indexer-declaration"
1199
+ "2": {
1200
+ "name": "meta.brace.square.tsx"
900
1201
  },
901
- {
902
- "include": "#type-annotation"
903
- },
904
- {
905
- "include": "#variable-initializer"
906
- },
907
- {
908
- "include": "#access-modifier"
909
- },
910
- {
911
- "include": "#static-modifier"
1202
+ "3": {
1203
+ "name": "variable.parameter.tsx"
1204
+ }
1205
+ },
1206
+ "end": "(\\])\\s*(\\?\\s*)?|$",
1207
+ "endCaptures": {
1208
+ "1": {
1209
+ "name": "meta.brace.square.tsx"
912
1210
  },
1211
+ "2": {
1212
+ "name": "keyword.operator.optional.tsx"
1213
+ }
1214
+ },
1215
+ "patterns": [
913
1216
  {
914
- "include": "#property-accessor"
1217
+ "include": "#type-annotation"
915
1218
  }
916
1219
  ]
917
1220
  },
918
- "object-declaration": {
919
- "begin": "\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(?<!\\.)(class|interface)\\b",
1221
+ "function-declaration": {
1222
+ "name": "meta.function.tsx",
1223
+ "begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
920
1224
  "beginCaptures": {
921
1225
  "1": {
922
- "name": "storage.type.tsx"
1226
+ "name": "keyword.control.export.tsx"
923
1227
  },
924
1228
  "2": {
925
- "name": "storage.modifier.tsx"
1229
+ "name": "storage.modifier.async.tsx"
926
1230
  },
927
1231
  "3": {
928
- "name": "storage.type.tsx"
929
- }
930
- },
931
- "end": "(?<=\\})",
932
- "endCaptures": {
933
- "1": {
934
- "name": "brace.curly.tsx"
1232
+ "name": "storage.type.function.tsx"
1233
+ },
1234
+ "4": {
1235
+ "name": "keyword.generator.asterisk.tsx"
1236
+ },
1237
+ "5": {
1238
+ "name": "meta.definition.function.tsx entity.name.function.tsx"
935
1239
  }
936
1240
  },
937
- "name": "meta.declaration.object.tsx",
1241
+ "end": "(?=;|\\})|(?<=\\})",
938
1242
  "patterns": [
939
1243
  {
940
1244
  "include": "#comment"
941
1245
  },
942
1246
  {
943
- "include": "#object-heritage"
1247
+ "include": "#type-parameters"
1248
+ },
1249
+ {
1250
+ "include": "#function-parameters"
944
1251
  },
945
1252
  {
946
- "include": "#object-name"
1253
+ "include": "#return-type"
947
1254
  },
948
1255
  {
949
- "include": "#type-parameters"
1256
+ "include": "#function-overload-declaration"
950
1257
  },
951
1258
  {
952
- "include": "#object-body"
1259
+ "include": "#decl-block"
953
1260
  }
954
1261
  ]
955
1262
  },
956
- "object-heritage": {
957
- "begin": "(?:\\b(extends|implements)\\b)",
958
- "beginCaptures": {
1263
+ "function-overload-declaration": {
1264
+ "name": "meta.function.overload.tsx",
1265
+ "match": "(?<!\\.|\\$)\\b(?:(export)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
1266
+ "captures": {
959
1267
  "1": {
960
- "name": "keyword.other.tsx"
1268
+ "name": "keyword.control.export.tsx"
1269
+ },
1270
+ "2": {
1271
+ "name": "storage.modifier.async.tsx"
1272
+ },
1273
+ "3": {
1274
+ "name": "storage.type.function.tsx"
1275
+ },
1276
+ "4": {
1277
+ "name": "keyword.generator.asterisk.tsx"
1278
+ },
1279
+ "5": {
1280
+ "name": "meta.definition.function.tsx entity.name.function.tsx"
1281
+ }
1282
+ }
1283
+ },
1284
+ "object-literal": {
1285
+ "name": "meta.objectliteral.tsx",
1286
+ "begin": "\\{",
1287
+ "beginCaptures": {
1288
+ "0": {
1289
+ "name": "punctuation.definition.block.tsx"
961
1290
  }
962
1291
  },
963
- "end": "(?=\\{)",
1292
+ "end": "\\}",
964
1293
  "endCaptures": {
965
- "1": {
966
- "name": "brace.curly.tsx"
1294
+ "0": {
1295
+ "name": "punctuation.definition.block.tsx"
967
1296
  }
968
1297
  },
969
- "name": "meta.object.heritage.tsx",
970
1298
  "patterns": [
971
1299
  {
972
- "include": "#comment"
973
- },
974
- {
975
- "include": "#object-heritage"
976
- },
977
- {
978
- "include": "#type-parameters"
979
- },
980
- {
981
- "include": "#object-heritage-type"
1300
+ "include": "#object-member"
982
1301
  }
983
1302
  ]
984
1303
  },
985
- "object-heritage-type": {
986
- "captures": {
987
- "1": {
988
- "name": "support.type.tsx"
1304
+ "decl-block": {
1305
+ "name": "meta.block.tsx",
1306
+ "begin": "\\{",
1307
+ "beginCaptures": {
1308
+ "0": {
1309
+ "name": "punctuation.definition.block.tsx"
1310
+ }
1311
+ },
1312
+ "end": "\\}",
1313
+ "endCaptures": {
1314
+ "0": {
1315
+ "name": "punctuation.definition.block.tsx"
989
1316
  }
990
1317
  },
991
- "match": "(?:\\b([a-zA-Z_$][\\w$]*)\\b)",
992
- "name": "meta.object.heritage.parent.tsx"
993
- },
994
- "object-member": {
995
- "begin": "[a-zA-Z_$][\\w$]*\\s*:",
996
- "end": "(?=,|\\})",
997
- "name": "meta.object.member.tsx",
998
1318
  "patterns": [
999
1319
  {
1000
- "include": "#expression"
1320
+ "include": "#statements"
1001
1321
  }
1002
1322
  ]
1003
1323
  },
1004
- "object-name": {
1005
- "captures": {
1324
+ "after-operator-block": {
1325
+ "name": "meta.objectliteral.tsx",
1326
+ "begin": "(?<=[=(,\\[?+!]|await|return|yield|throw|in|of|typeof|&&|\\|\\||\\*)\\s*(\\{)",
1327
+ "beginCaptures": {
1328
+ "1": {
1329
+ "name": "punctuation.definition.block.tsx"
1330
+ }
1331
+ },
1332
+ "end": "\\}",
1333
+ "endCaptures": {
1006
1334
  "0": {
1007
- "name": "entity.name.class.tsx"
1335
+ "name": "punctuation.definition.block.tsx"
1008
1336
  }
1009
1337
  },
1010
- "match": "[a-zA-Z_$][\\w$]*",
1011
- "name": "meta.object.name.tsx"
1338
+ "patterns": [
1339
+ {
1340
+ "include": "#object-member"
1341
+ }
1342
+ ]
1012
1343
  },
1013
1344
  "parameter-name": {
1345
+ "match": "(?:\\s*\\b(readonly)\\s+)?(?:\\s*\\b(public|private|protected)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\??)",
1014
1346
  "captures": {
1015
1347
  "1": {
1016
1348
  "name": "storage.modifier.tsx"
1017
1349
  },
1018
1350
  "2": {
1019
- "name": "keyword.others.tsx"
1351
+ "name": "storage.modifier.tsx"
1020
1352
  },
1021
1353
  "3": {
1022
- "name": "variable.parameter.tsx"
1354
+ "name": "keyword.operator.rest.tsx"
1023
1355
  },
1024
1356
  "4": {
1025
- "name": "keyword.others.tsx"
1357
+ "name": "variable.parameter.tsx"
1358
+ },
1359
+ "5": {
1360
+ "name": "keyword.operator.optional.tsx"
1026
1361
  }
1027
- },
1028
- "match": "(?:\\s*\\b(public|private|protected)\\b\\s+)?(\\.\\.\\.)?\\s*([a-zA-Z_$][\\w$]*)\\s*(\\??)",
1029
- "name": "parameter.name.tsx"
1362
+ }
1030
1363
  },
1031
- "paren-expression": {
1032
- "begin": "\\(",
1033
- "beginCaptures": {
1034
- "0": {
1035
- "name": "meta.brace.paren.tsx"
1036
- }
1037
- },
1038
- "end": "\\)",
1039
- "endCaptures": {
1040
- "0": {
1041
- "name": "meta.brace.paren.tsx"
1042
- }
1043
- },
1364
+ "destructuring-parameter": {
1044
1365
  "patterns": [
1045
1366
  {
1046
- "include": "#expression"
1047
- }
1048
- ]
1049
- },
1050
- "property-accessor": {
1051
- "match": "\\b(get|set)\\b",
1052
- "name": "storage.type.property.tsx"
1053
- },
1054
- "qstring-double": {
1055
- "begin": "\"",
1056
- "end": "\"|(?:[^\\\\\\n]$)",
1057
- "name": "string.double.tsx",
1058
- "patterns": [
1367
+ "name": "meta.parameter.object-binding-pattern.tsx",
1368
+ "begin": "(?<!=|:)\\s*(\\{)",
1369
+ "beginCaptures": {
1370
+ "1": {
1371
+ "name": "punctuation.definition.binding-pattern.object.tsx"
1372
+ }
1373
+ },
1374
+ "end": "\\}",
1375
+ "endCaptures": {
1376
+ "0": {
1377
+ "name": "punctuation.definition.binding-pattern.object.tsx"
1378
+ }
1379
+ },
1380
+ "patterns": [
1381
+ {
1382
+ "include": "#parameter-object-binding-element"
1383
+ }
1384
+ ]
1385
+ },
1059
1386
  {
1060
- "include": "#string-character-escape"
1387
+ "name": "meta.paramter.array-binding-pattern.tsx",
1388
+ "begin": "(?<!=|:)\\s*(\\[)",
1389
+ "beginCaptures": {
1390
+ "1": {
1391
+ "name": "punctuation.definition.binding-pattern.array.tsx"
1392
+ }
1393
+ },
1394
+ "end": "\\]",
1395
+ "endCaptures": {
1396
+ "0": {
1397
+ "name": "punctuation.definition.binding-pattern.array.tsx"
1398
+ }
1399
+ },
1400
+ "patterns": [
1401
+ {
1402
+ "include": "#parameter-array-binding-element"
1403
+ }
1404
+ ]
1061
1405
  }
1062
1406
  ]
1063
1407
  },
1064
- "qstring-single": {
1065
- "begin": "'",
1066
- "end": "\\'|(?:[^\\\\\\n]$)",
1067
- "name": "string.single.tsx",
1408
+ "parameter-object-binding-element": {
1068
1409
  "patterns": [
1069
1410
  {
1070
- "include": "#string-character-escape"
1071
- }
1072
- ]
1073
- },
1074
- "regex": {
1075
- "begin": "(?<=[=(:,\\[]|^|return|&&|\\|\\||!)\\s*(/)(?![/*+{}?])",
1076
- "end": "$|(/)[igm]*",
1077
- "name": "string.regex.tsx",
1078
- "patterns": [
1411
+ "include": "#comment"
1412
+ },
1413
+ {
1414
+ "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)",
1415
+ "beginCaptures": {
1416
+ "1": {
1417
+ "name": "variable.object.property.tsx"
1418
+ },
1419
+ "2": {
1420
+ "name": "punctuation.destructuring.tsx"
1421
+ }
1422
+ },
1423
+ "end": "(?=,|\\})",
1424
+ "patterns": [
1425
+ {
1426
+ "include": "#parameter-object-binding-pattern"
1427
+ },
1428
+ {
1429
+ "include": "#parameter-array-binding-pattern"
1430
+ },
1431
+ {
1432
+ "name": "variable.parameter.tsx",
1433
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)"
1434
+ },
1435
+ {
1436
+ "include": "#variable-initializer"
1437
+ }
1438
+ ]
1439
+ },
1079
1440
  {
1080
- "match": "\\\\.",
1081
- "name": "constant.character.escape.tsx"
1441
+ "include": "#parameter-object-binding-pattern"
1082
1442
  },
1083
1443
  {
1084
- "match": "\\[(\\\\\\]|[^\\]])*\\]",
1085
- "name": "constant.character.class.tsx"
1086
- }
1087
- ]
1088
- },
1089
- "relational-operator": {
1090
- "match": "===|!==|==|!=|<=|>=|<>|=|<|>",
1091
- "name": "keyword.operator.comparison.tsx"
1092
- },
1093
- "return-type": {
1094
- "begin": "(?<=\\))\\s*:",
1095
- "end": "(?=$)|(?=\\{|;|//)",
1096
- "name": "meta.return.type.tsx",
1097
- "patterns": [
1444
+ "include": "#destructuring-parameter-rest"
1445
+ },
1098
1446
  {
1099
- "include": "#type"
1447
+ "include": "#variable-initializer"
1448
+ },
1449
+ {
1450
+ "include": "#punctuation-comma"
1100
1451
  }
1101
1452
  ]
1102
1453
  },
1103
- "static-modifier": {
1104
- "match": "\\b(static)\\b",
1105
- "name": "keyword.other.tsx"
1106
- },
1107
- "storage-keyword": {
1108
- "match": "\\b(var|let|function|const|module|namespace|void|export)\\b",
1109
- "name": "storage.type.tsx"
1110
- },
1111
- "string": {
1112
- "name": "string.tsx",
1454
+ "parameter-array-binding-element": {
1113
1455
  "patterns": [
1114
1456
  {
1115
- "include": "#qstring-single"
1457
+ "include": "#comment"
1116
1458
  },
1117
1459
  {
1118
- "include": "#qstring-double"
1460
+ "include": "#parameter-object-binding-pattern"
1461
+ },
1462
+ {
1463
+ "include": "#parameter-array-binding-pattern"
1464
+ },
1465
+ {
1466
+ "include": "#destructuring-parameter-rest"
1467
+ },
1468
+ {
1469
+ "include": "#variable-initializer"
1470
+ },
1471
+ {
1472
+ "include": "#punctuation-comma"
1119
1473
  }
1120
1474
  ]
1121
1475
  },
1122
- "string-character-escape": {
1123
- "match": "\\\\(x\\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)",
1124
- "name": "constant.character.escape"
1125
- },
1126
- "switch-block": {
1127
- "begin": "{",
1128
- "end": "(?=\\})",
1129
- "name": "switch-block.expr.tsx",
1130
- "patterns": [
1131
- {
1132
- "include": "#expression"
1476
+ "destructuring-parameter-rest": {
1477
+ "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
1478
+ "captures": {
1479
+ "1": {
1480
+ "name": "keyword.operator.rest.tsx"
1481
+ },
1482
+ "2": {
1483
+ "name": "variable.parameter.tsx"
1133
1484
  }
1134
- ]
1485
+ }
1135
1486
  },
1136
- "switch-expression": {
1137
- "begin": "\\b(switch)\\b\\s*\\(",
1487
+ "parameter-object-binding-pattern": {
1488
+ "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
1138
1489
  "beginCaptures": {
1139
1490
  "1": {
1140
- "name": "keyword.control.tsx"
1491
+ "name": "keyword.operator.rest.tsx"
1492
+ },
1493
+ "2": {
1494
+ "name": "punctuation.definition.binding-pattern.object.tsx"
1141
1495
  }
1142
1496
  },
1143
- "end": "\\)",
1144
- "name": "switch-expression.expr.tsx",
1145
- "patterns": [
1146
- {
1147
- "include": "#expression"
1497
+ "end": "\\}",
1498
+ "endCaptures": {
1499
+ "0": {
1500
+ "name": "punctuation.definition.binding-pattern.object.tsx"
1148
1501
  }
1149
- ]
1150
- },
1151
- "switch-statement": {
1152
- "begin": "(?=\\bswitch\\b\\s*\\()",
1153
- "end": "}",
1154
- "name": "switch-statement.expr.tsx",
1502
+ },
1155
1503
  "patterns": [
1156
1504
  {
1157
- "include": "#switch-expression"
1158
- },
1159
- {
1160
- "include": "#switch-block"
1505
+ "include": "#parameter-object-binding-element"
1161
1506
  }
1162
1507
  ]
1163
1508
  },
1164
- "template": {
1165
- "begin": "`",
1509
+ "parameter-array-binding-pattern": {
1510
+ "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
1166
1511
  "beginCaptures": {
1167
- "0": {
1168
- "name": "string.template.tsx"
1512
+ "1": {
1513
+ "name": "keyword.operator.rest.tsx"
1514
+ },
1515
+ "2": {
1516
+ "name": "punctuation.definition.binding-pattern.array.tsx"
1169
1517
  }
1170
1518
  },
1171
- "end": "`",
1519
+ "end": "\\]",
1172
1520
  "endCaptures": {
1173
1521
  "0": {
1174
- "name": "string.template.tsx"
1522
+ "name": "punctuation.definition.binding-pattern.array.tsx"
1175
1523
  }
1176
1524
  },
1177
- "name": "meta.template.tsx",
1178
1525
  "patterns": [
1179
1526
  {
1180
- "include": "#template-substitution-element"
1181
- },
1182
- {
1183
- "include": "#template-string-contents"
1527
+ "include": "#parameter-array-binding-element"
1184
1528
  }
1185
1529
  ]
1186
1530
  },
1187
- "template-string-contents": {
1188
- "begin": ".*?",
1189
- "end": "(?=(\\$\\{|`))",
1190
- "name": "string.template.tsx",
1531
+ "return-type": {
1532
+ "name": "meta.return.type.tsx",
1533
+ "begin": "(?<=\\))\\s*(:)",
1534
+ "beginCaptures": {
1535
+ "1": {
1536
+ "name": "keyword.operator.type.annotation.tsx"
1537
+ }
1538
+ },
1539
+ "end": "(?<!:)((?=$)|(?=\\{|;|//|\\}))",
1191
1540
  "patterns": [
1192
1541
  {
1193
- "include": "#string-character-escape"
1542
+ "include": "#comment"
1543
+ },
1544
+ {
1545
+ "name": "meta.object.type.tsx",
1546
+ "begin": "(?<=:)\\s*(\\{)",
1547
+ "beginCaptures": {
1548
+ "1": {
1549
+ "name": "punctuation.definition.block.tsx"
1550
+ }
1551
+ },
1552
+ "end": "\\}",
1553
+ "endCaptures": {
1554
+ "0": {
1555
+ "name": "punctuation.definition.block.tsx"
1556
+ }
1557
+ },
1558
+ "patterns": [
1559
+ {
1560
+ "include": "#type-object-members"
1561
+ }
1562
+ ]
1563
+ },
1564
+ {
1565
+ "include": "#type-predicate-operator"
1566
+ },
1567
+ {
1568
+ "include": "#type"
1194
1569
  }
1195
1570
  ]
1196
1571
  },
1197
- "template-substitution-element": {
1198
- "begin": "\\$\\{",
1572
+ "type-predicate-operator": {
1573
+ "name": "keyword.operator.expression.is.tsx",
1574
+ "match": "(?<!\\.|\\$)\\bis\\b(?!\\$)"
1575
+ },
1576
+ "type-annotation": {
1577
+ "name": "meta.type.annotation.tsx",
1578
+ "begin": ":",
1199
1579
  "beginCaptures": {
1200
1580
  "0": {
1201
- "name": "keyword.others.tsx"
1581
+ "name": "keyword.operator.type.annotation.tsx"
1202
1582
  }
1203
1583
  },
1204
- "end": "\\}",
1205
- "endCaptures": {
1206
- "0": {
1207
- "name": "keyword.others.tsx"
1208
- }
1209
- },
1210
- "name": "template.element.tsx",
1211
- "patterns": [
1212
- {
1213
- "include": "#expression"
1214
- }
1215
- ]
1216
- },
1217
- "ternary-expression": {
1218
- "begin": "(?=\\?)",
1219
- "end": "(?=$|[;,])",
1584
+ "end": "(?=$|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)",
1220
1585
  "patterns": [
1221
1586
  {
1222
- "include": "#ternary-operator"
1587
+ "include": "#comment"
1223
1588
  },
1224
1589
  {
1225
- "include": "#expression-type"
1226
- }
1227
- ]
1228
- },
1229
- "ternary-operator": {
1230
- "begin": "(\\?)",
1231
- "end": "(:)",
1232
- "patterns": [
1233
- {
1234
- "include": "#expression-type"
1590
+ "include": "#type"
1235
1591
  }
1236
1592
  ]
1237
1593
  },
1238
- "this-literal": {
1239
- "match": "\\b(this)\\b",
1240
- "name": "constant.language.this.tsx"
1241
- },
1242
1594
  "type": {
1243
1595
  "name": "meta.type.tsx",
1244
1596
  "patterns": [
1597
+ {
1598
+ "include": "#comment"
1599
+ },
1600
+ {
1601
+ "include": "#string"
1602
+ },
1603
+ {
1604
+ "include": "#numeric-literal"
1605
+ },
1245
1606
  {
1246
1607
  "include": "#type-primitive"
1247
1608
  },
1609
+ {
1610
+ "include": "#type-builtin-literals"
1611
+ },
1248
1612
  {
1249
1613
  "include": "#type-parameters"
1250
1614
  },
@@ -1255,10 +1619,13 @@
1255
1619
  "include": "#type-object"
1256
1620
  },
1257
1621
  {
1258
- "include": "#type-operator"
1622
+ "include": "#type-operators"
1623
+ },
1624
+ {
1625
+ "include": "#type-fn-type-parameters"
1259
1626
  },
1260
1627
  {
1261
- "include": "#type-paren-or-function-type-parameters"
1628
+ "include": "#type-paren-or-function-parameters"
1262
1629
  },
1263
1630
  {
1264
1631
  "include": "#type-function-return-type"
@@ -1268,171 +1635,178 @@
1268
1635
  }
1269
1636
  ]
1270
1637
  },
1271
- "type-annotation": {
1272
- "begin": ":",
1273
- "end": "(?=$|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[a-zA-Z_$])\\s*(?=\\{)",
1274
- "name": "meta.type.annotation.tsx",
1638
+ "function-parameters": {
1639
+ "name": "meta.parameters.tsx",
1640
+ "begin": "\\(",
1641
+ "beginCaptures": {
1642
+ "0": {
1643
+ "name": "punctuation.definition.parameters.begin.tsx"
1644
+ }
1645
+ },
1646
+ "end": "\\)",
1647
+ "endCaptures": {
1648
+ "0": {
1649
+ "name": "punctuation.definition.parameters.end.tsx"
1650
+ }
1651
+ },
1275
1652
  "patterns": [
1276
1653
  {
1277
- "include": "#expression-operator"
1654
+ "include": "#comment"
1278
1655
  },
1279
1656
  {
1280
- "include": "#type"
1657
+ "include": "#decorator"
1281
1658
  },
1282
1659
  {
1283
- "include": "#string"
1660
+ "include": "#destructuring-parameter"
1284
1661
  },
1285
1662
  {
1286
- "include": "#comment"
1287
- }
1288
- ]
1289
- },
1290
- "type-declaration": {
1291
- "begin": "\\b(type)\\b\\s+([a-zA-Z_$][\\w$]*)\\s*",
1292
- "beginCaptures": {
1293
- "1": {
1294
- "name": "keyword.other.tsx"
1663
+ "include": "#parameter-name"
1295
1664
  },
1296
- "2": {
1297
- "name": "entity.name.class.tsx"
1298
- }
1299
- },
1300
- "end": "(?=$|[,);>]|var|type|function|class|interface)",
1301
- "name": "meta.type.declaration.tsx",
1302
- "patterns": [
1303
1665
  {
1304
- "include": "#type-parameters"
1666
+ "include": "#type-annotation"
1305
1667
  },
1306
1668
  {
1307
- "include": "#type"
1669
+ "include": "#variable-initializer"
1308
1670
  },
1309
1671
  {
1310
- "match": "=\\s*",
1311
- "name": "keyword.operator.comparison.tsx"
1672
+ "name": "punctuation.separator.parameter.tsx",
1673
+ "match": ","
1312
1674
  }
1313
1675
  ]
1314
1676
  },
1315
- "type-function-return-type": {
1316
- "begin": "=>",
1317
- "beginCaptures": {
1318
- "0": {
1319
- "name": "keyword.operator.tsx"
1320
- }
1321
- },
1322
- "end": "(?=\\s*[,\\)\\{=;>]|//|$)",
1323
- "name": "meta.type.function.return.tsx",
1324
- "patterns": [
1325
- {
1326
- "include": "#type"
1327
- }
1328
- ]
1677
+ "type-primitive": {
1678
+ "name": "support.type.primitive.tsx",
1679
+ "match": "(?<!\\.|\\$)\\b(string|number|boolean|symbol|any|void|never)\\b(?!\\$)"
1329
1680
  },
1330
- "type-name": {
1331
- "captures": {
1332
- "1": {
1333
- "name": "entity.name.type.tsx"
1334
- }
1335
- },
1336
- "match": "[a-zA-Z_$][.\\w$]*",
1337
- "name": "meta.type.name.tsx"
1681
+ "type-builtin-literals": {
1682
+ "name": "support.type.builtin.tsx",
1683
+ "match": "(?<!\\.|\\$)\\b(this|true|false|undefined|null)\\b(?!\\$)"
1338
1684
  },
1339
- "type-object": {
1340
- "begin": "\\{",
1685
+ "type-paren-or-function-parameters": {
1686
+ "name": "meta.type.paren.cover.tsx",
1687
+ "begin": "\\s*(\\()",
1341
1688
  "beginCaptures": {
1342
- "0": {
1343
- "name": "meta.brace.curly.tsx"
1689
+ "1": {
1690
+ "name": "meta.brace.round.tsx"
1344
1691
  }
1345
1692
  },
1346
- "end": "\\}",
1693
+ "end": "\\)",
1347
1694
  "endCaptures": {
1348
1695
  "0": {
1349
- "name": "meta.brace.curly.tsx"
1696
+ "name": "meta.brace.round.tsx"
1350
1697
  }
1351
1698
  },
1352
- "name": "meta.object.type.tsx",
1353
1699
  "patterns": [
1354
1700
  {
1355
- "include": "#comment"
1701
+ "include": "#type"
1356
1702
  },
1357
1703
  {
1358
- "include": "#field-declaration"
1704
+ "include": "#function-parameters"
1705
+ }
1706
+ ]
1707
+ },
1708
+ "type-fn-type-parameters": {
1709
+ "patterns": [
1710
+ {
1711
+ "name": "meta.type.constructor.tsx",
1712
+ "match": "(?<!\\.|\\$)\\b(new)\\b(?=\\s*\\<)",
1713
+ "captures": {
1714
+ "1": {
1715
+ "name": "keyword.control.new.tsx"
1716
+ }
1717
+ }
1359
1718
  },
1360
1719
  {
1361
- "include": "#method-declaration"
1720
+ "name": "meta.type.constructor.tsx",
1721
+ "begin": "(?<!\\.|\\$)\\b(new)\\b\\s*(?=\\()",
1722
+ "beginCaptures": {
1723
+ "1": {
1724
+ "name": "keyword.control.new.tsx"
1725
+ }
1726
+ },
1727
+ "end": "(?<=\\))",
1728
+ "patterns": [
1729
+ {
1730
+ "include": "#function-parameters"
1731
+ }
1732
+ ]
1362
1733
  },
1363
1734
  {
1364
- "include": "#indexer-declaration"
1735
+ "name": "meta.type.function.tsx",
1736
+ "begin": "(?<=\\>)\\s*(?=\\()",
1737
+ "end": "(?<=\\))",
1738
+ "patterns": [
1739
+ {
1740
+ "include": "#function-parameters"
1741
+ }
1742
+ ]
1365
1743
  },
1366
1744
  {
1367
- "include": "#type-annotation"
1745
+ "name": "meta.type.function.tsx",
1746
+ "begin": "(?x)( \\s* (?= [(]\\s*( ([)]) | (\\.\\.\\.) | ([_$[:alnum:]]+\\s*( ([:,?=])| ([)]\\s*=>) )) ) ) )",
1747
+ "end": "(?<=\\))",
1748
+ "patterns": [
1749
+ {
1750
+ "include": "#function-parameters"
1751
+ }
1752
+ ]
1368
1753
  }
1369
1754
  ]
1370
1755
  },
1371
- "type-operator": {
1372
- "match": "[.|]",
1373
- "name": "keyword.operator.type.tsx"
1374
- },
1375
- "type-parameters": {
1376
- "begin": "([a-zA-Z_$][\\w$]*)?(<)",
1377
- "beginCaptures": {
1378
- "1": {
1379
- "name": "entity.name.type.tsx"
1380
- },
1381
- "2": {
1382
- "name": "meta.brace.angle.tsx"
1383
- }
1384
- },
1385
- "end": "(?=$)|(>)",
1386
- "endCaptures": {
1387
- "2": {
1388
- "name": "meta.brace.angle.tsx"
1389
- }
1390
- },
1391
- "name": "meta.type.parameters.tsx",
1756
+ "type-operators": {
1392
1757
  "patterns": [
1393
1758
  {
1394
- "match": "\\b(extends)\\b",
1395
- "name": "keyword.other.tsx"
1396
- },
1397
- {
1398
- "include": "#comment"
1759
+ "include": "#typeof-operator"
1399
1760
  },
1400
1761
  {
1401
- "include": "#type"
1762
+ "name": "keyword.operator.type.tsx",
1763
+ "match": "[&|]"
1402
1764
  }
1403
1765
  ]
1404
1766
  },
1405
- "type-paren-or-function-type-parameters": {
1406
- "begin": "(?:\\b(new)\\b)?\\s*\\(",
1767
+ "type-function-return-type": {
1768
+ "name": "meta.type.function.return.tsx",
1769
+ "begin": "=>",
1407
1770
  "beginCaptures": {
1408
- "1": {
1409
- "name": "keyword.control.tsx"
1771
+ "0": {
1772
+ "name": "storage.type.function.arrow.tsx"
1410
1773
  }
1411
1774
  },
1412
- "end": "\\)",
1413
- "name": "meta.type.paren.cover.tsx",
1775
+ "end": "(?<!=>)(?=[,\\]\\)\\{\\}=;>]|//|$)",
1414
1776
  "patterns": [
1415
1777
  {
1416
1778
  "include": "#comment"
1417
1779
  },
1418
1780
  {
1419
- "include": "#type"
1781
+ "name": "meta.object.type.tsx",
1782
+ "begin": "(?<==>)\\s*(\\{)",
1783
+ "beginCaptures": {
1784
+ "1": {
1785
+ "name": "punctuation.definition.block.tsx"
1786
+ }
1787
+ },
1788
+ "end": "\\}",
1789
+ "endCaptures": {
1790
+ "0": {
1791
+ "name": "punctuation.definition.block.tsx"
1792
+ }
1793
+ },
1794
+ "patterns": [
1795
+ {
1796
+ "include": "#type-object-members"
1797
+ }
1798
+ ]
1799
+ },
1800
+ {
1801
+ "include": "#type-predicate-operator"
1420
1802
  },
1421
1803
  {
1422
- "include": "#function-type-parameters"
1804
+ "include": "#type"
1423
1805
  }
1424
1806
  ]
1425
1807
  },
1426
- "type-primitive": {
1427
- "captures": {
1428
- "1": {
1429
- "name": "support.type.tsx"
1430
- }
1431
- },
1432
- "match": "\\b(string|number|boolean|symbol|any|void)\\b",
1433
- "name": "meta.type.primitive.tsx"
1434
- },
1435
1808
  "type-tuple": {
1809
+ "name": "meta.type.tuple.tsx",
1436
1810
  "begin": "\\[",
1437
1811
  "beginCaptures": {
1438
1812
  "0": {
@@ -1445,80 +1819,1644 @@
1445
1819
  "name": "meta.brace.square.tsx"
1446
1820
  }
1447
1821
  },
1448
- "name": "meta.type.tuple.tsx",
1449
1822
  "patterns": [
1450
1823
  {
1451
1824
  "include": "#type"
1452
1825
  },
1453
1826
  {
1454
- "include": "#comment"
1827
+ "include": "#punctuation-comma"
1455
1828
  }
1456
1829
  ]
1457
1830
  },
1458
- "undefined-literal": {
1459
- "match": "\\b(undefined)\\b",
1460
- "name": "constant.language.tsx"
1461
- },
1462
- "var-expr": {
1463
- "begin": "(?<!\\()\\s*\\b(var|let|const(?!\\s+enum))\\b",
1464
- "beginCaptures": {
1465
- "1": {
1466
- "name": "storage.type.tsx"
1467
- }
1468
- },
1469
- "end": "(?=$|;)",
1470
- "name": "meta.var.expr.tsx",
1831
+ "type-name": {
1471
1832
  "patterns": [
1472
1833
  {
1473
- "include": "#var-single-variable"
1834
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)",
1835
+ "captures": {
1836
+ "1": {
1837
+ "name": "entity.name.type.module.tsx"
1838
+ },
1839
+ "2": {
1840
+ "name": "punctuation.accessor.tsx"
1841
+ }
1842
+ }
1474
1843
  },
1475
1844
  {
1476
- "include": "#comment"
1845
+ "name": "entity.name.type.tsx",
1846
+ "match": "[_$[:alpha:]][_$[:alnum:]]*"
1477
1847
  }
1478
1848
  ]
1479
1849
  },
1480
- "var-single-variable": {
1481
- "begin": "\\b([a-zA-Z_$][\\w$]*)\\s*(=?)",
1850
+ "type-parameters": {
1851
+ "name": "meta.type.parameters.tsx",
1852
+ "begin": "(<)",
1482
1853
  "beginCaptures": {
1483
1854
  "1": {
1484
- "name": "variable.tsx"
1855
+ "name": "punctuation.definition.typeparameters.begin.tsx"
1856
+ }
1857
+ },
1858
+ "end": "(?=$)|(>)",
1859
+ "endCaptures": {
1860
+ "1": {
1861
+ "name": "punctuation.definition.typeparameters.end.tsx"
1485
1862
  }
1486
1863
  },
1487
- "end": "(?=$|[;,])",
1488
- "name": "meta.var-single-variable.expr.tsx",
1489
1864
  "patterns": [
1490
1865
  {
1491
- "include": "#ternary-expression"
1492
- },
1493
- {
1494
- "include": "#type-annotation"
1866
+ "include": "#comment"
1495
1867
  },
1496
1868
  {
1497
- "include": "#string"
1869
+ "name": "storage.modifier.tsx",
1870
+ "match": "(?<!\\.|\\$)\\b(extends)\\b(?!\\$)"
1498
1871
  },
1499
1872
  {
1500
- "include": "#comment"
1873
+ "include": "#type"
1501
1874
  },
1502
1875
  {
1503
- "include": "#expression"
1876
+ "include": "#punctuation-comma"
1504
1877
  }
1505
1878
  ]
1506
1879
  },
1507
1880
  "variable-initializer": {
1508
- "begin": "(=)",
1881
+ "begin": "(?<!=|!)(=)(?!=)",
1509
1882
  "beginCaptures": {
1510
1883
  "1": {
1511
- "name": "keyword.operator.comparison.tsx"
1884
+ "name": "keyword.operator.assignment.tsx"
1512
1885
  }
1513
1886
  },
1514
- "end": "(?=$|[,);=])",
1887
+ "end": "(?=$|[,);}\\]])",
1515
1888
  "patterns": [
1516
1889
  {
1517
1890
  "include": "#expression"
1518
1891
  }
1519
1892
  ]
1520
- }
1521
- },
1522
- "scopeName": "source.tsx",
1523
- "uuid": "805375ec-d614-41f5-8993-5843fe63ea82"
1893
+ },
1894
+ "for-loop": {
1895
+ "begin": "(?<!\\.|\\$)\\b(for)\\s*(\\()",
1896
+ "beginCaptures": {
1897
+ "1": {
1898
+ "name": "keyword.control.loop.tsx"
1899
+ },
1900
+ "2": {
1901
+ "name": "meta.brace.round.tsx"
1902
+ }
1903
+ },
1904
+ "end": "\\)",
1905
+ "endCaptures": {
1906
+ "0": {
1907
+ "name": "meta.brace.round.tsx"
1908
+ }
1909
+ },
1910
+ "patterns": [
1911
+ {
1912
+ "include": "#var-expr"
1913
+ },
1914
+ {
1915
+ "include": "#expression"
1916
+ },
1917
+ {
1918
+ "include": "#punctuation-semicolon"
1919
+ }
1920
+ ]
1921
+ },
1922
+ "switch-expression": {
1923
+ "name": "switch-expression.expr.tsx",
1924
+ "begin": "(?<!\\.|\\$)\\b(switch)\\s*(\\()",
1925
+ "beginCaptures": {
1926
+ "1": {
1927
+ "name": "keyword.control.switch.tsx"
1928
+ },
1929
+ "2": {
1930
+ "name": "meta.brace.round.tsx"
1931
+ }
1932
+ },
1933
+ "end": "\\)",
1934
+ "endCaptures": {
1935
+ "0": {
1936
+ "name": "meta.brace.round.tsx"
1937
+ }
1938
+ },
1939
+ "patterns": [
1940
+ {
1941
+ "include": "#expression"
1942
+ }
1943
+ ]
1944
+ },
1945
+ "switch-block": {
1946
+ "name": "switch-block.expr.tsx",
1947
+ "begin": "{",
1948
+ "beginCaptures": {
1949
+ "0": {
1950
+ "name": "punctuation.definition.block.tsx"
1951
+ }
1952
+ },
1953
+ "end": "(?=\\})",
1954
+ "patterns": [
1955
+ {
1956
+ "include": "#case-clause"
1957
+ },
1958
+ {
1959
+ "include": "#statements"
1960
+ }
1961
+ ]
1962
+ },
1963
+ "case-clause": {
1964
+ "name": "case-clause.expr.tsx",
1965
+ "begin": "(?<!\\.|\\$)\\b(case|default(?=:))\\b(?!\\$)",
1966
+ "beginCaptures": {
1967
+ "1": {
1968
+ "name": "keyword.control.switch.tsx"
1969
+ }
1970
+ },
1971
+ "end": ":",
1972
+ "endCaptures": {
1973
+ "0": {
1974
+ "name": "punctuation.definition.section.case-statement.tsx"
1975
+ }
1976
+ },
1977
+ "patterns": [
1978
+ {
1979
+ "include": "#expression"
1980
+ }
1981
+ ]
1982
+ },
1983
+ "switch-statement": {
1984
+ "name": "switch-statement.expr.tsx",
1985
+ "begin": "(?<!\\.|\\$)(?=\\bswitch\\s*\\()",
1986
+ "end": "}",
1987
+ "endCaptures": {
1988
+ "0": {
1989
+ "name": "punctuation.definition.block.tsx"
1990
+ }
1991
+ },
1992
+ "patterns": [
1993
+ {
1994
+ "include": "#switch-expression"
1995
+ },
1996
+ {
1997
+ "include": "#switch-block"
1998
+ }
1999
+ ]
2000
+ },
2001
+ "support-objects": {
2002
+ "patterns": [
2003
+ {
2004
+ "name": "variable.language.arguments.tsx",
2005
+ "match": "(?<!\\.|\\$)\\b(arguments)\\b(?!\\$)"
2006
+ },
2007
+ {
2008
+ "name": "support.class.builtin.tsx",
2009
+ "match": "(?x)(?<!\\.|\\$)\\b(Array|ArrayBuffer|Atomics|Boolean|DataView|Date|Float32Array|Float64Array|Function|Generator |GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Promise|Proxy |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\\b(?!\\$)"
2010
+ },
2011
+ {
2012
+ "name": "support.class.error.tsx",
2013
+ "match": "(?<!\\.|\\$)\\b((Eval|Internal|Range|Reference|Syntax|Type|URI)?Error)\\b(?!\\$)"
2014
+ },
2015
+ {
2016
+ "name": "support.function.tsx",
2017
+ "match": "(?x)(?<!\\.|\\$)\\b(clear(Interval|Timeout)|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval| isFinite|isNaN|parseFloat|parseInt|require|set(Interval|Timeout)|super|unescape|uneval)(?=\\s*\\()"
2018
+ },
2019
+ {
2020
+ "match": "(?x)(?<!\\.|\\$)\\b(Math)(?:\\s*(\\.)\\s*(?:\n (abs|acos|acosh|asin|asinh|atan|atan2|atanh|cbrt|ceil|clz32|cos|cosh|exp|\n expm1|floor|fround|hypot|imul|log|log10|log1p|log2|max|min|pow|random|\n round|sign|sin|sinh|sqrt|tan|tanh|trunc)\n |\n (E|LN10|LN2|LOG10E|LOG2E|PI|SQRT1_2|SQRT2)))?\\b(?!\\$)",
2021
+ "captures": {
2022
+ "1": {
2023
+ "name": "support.constant.math.tsx"
2024
+ },
2025
+ "2": {
2026
+ "name": "punctuation.accessor.tsx"
2027
+ },
2028
+ "3": {
2029
+ "name": "support.function.math.tsx"
2030
+ },
2031
+ "4": {
2032
+ "name": "support.constant.property.math.tsx"
2033
+ }
2034
+ }
2035
+ },
2036
+ {
2037
+ "match": "(?x)(?<!\\.|\\$)\\b(console)(?:\\s*(\\.)\\s*(\n assert|clear|count|debug|dir|error|group|groupCollapsed|groupEnd|info|log\n |profile|profileEnd|table|time|timeEnd|timeStamp|trace|warn))?\\b(?!\\$)",
2038
+ "captures": {
2039
+ "1": {
2040
+ "name": "support.class.console.tsx"
2041
+ },
2042
+ "2": {
2043
+ "name": "punctuation.accessor.tsx"
2044
+ },
2045
+ "3": {
2046
+ "name": "support.function.console.tsx"
2047
+ }
2048
+ }
2049
+ },
2050
+ {
2051
+ "match": "(?<!\\.|\\$)\\b(JSON)(?:\\s*(\\.)\\s*(parse|stringify))?\\b(?!\\$)",
2052
+ "captures": {
2053
+ "1": {
2054
+ "name": "support.constant.json.tsx"
2055
+ },
2056
+ "2": {
2057
+ "name": "punctuation.accessor.tsx"
2058
+ },
2059
+ "3": {
2060
+ "name": "support.function.json.tsx"
2061
+ }
2062
+ }
2063
+ },
2064
+ {
2065
+ "match": "(?x) (\\.) \\s* (?:\n (constructor|length|prototype|__proto__) \n |\n (EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY))\\b(?!\\$)",
2066
+ "captures": {
2067
+ "1": {
2068
+ "name": "punctuation.accessor.tsx"
2069
+ },
2070
+ "2": {
2071
+ "name": "support.variable.property.tsx"
2072
+ },
2073
+ "3": {
2074
+ "name": "support.constant.tsx"
2075
+ }
2076
+ }
2077
+ },
2078
+ {
2079
+ "match": "(?x) (?<!\\.|\\$) \\b (?:\n (document|event|navigator|performance|screen|window) \n |\n (AnalyserNode|ArrayBufferView|Attr|AudioBuffer|AudioBufferSourceNode|AudioContext|AudioDestinationNode|AudioListener\n |AudioNode|AudioParam|BatteryManager|BeforeUnloadEvent|BiquadFilterNode|Blob|BufferSource|ByteString|CSS|CSSConditionRule\n |CSSCounterStyleRule|CSSGroupingRule|CSSMatrix|CSSMediaRule|CSSPageRule|CSSPrimitiveValue|CSSRule|CSSRuleList|CSSStyleDeclaration\n |CSSStyleRule|CSSStyleSheet|CSSSupportsRule|CSSValue|CSSValueList|CanvasGradient|CanvasImageSource|CanvasPattern\n |CanvasRenderingContext2D|ChannelMergerNode|ChannelSplitterNode|CharacterData|ChromeWorker|CloseEvent|Comment|CompositionEvent\n |Console|ConvolverNode|Coordinates|Credential|CredentialsContainer|Crypto|CryptoKey|CustomEvent|DOMError|DOMException\n |DOMHighResTimeStamp|DOMImplementation|DOMString|DOMStringList|DOMStringMap|DOMTimeStamp|DOMTokenList|DataTransfer\n |DataTransferItem|DataTransferItemList|DedicatedWorkerGlobalScope|DelayNode|DeviceProximityEvent|DirectoryEntry\n |DirectoryEntrySync|DirectoryReader|DirectoryReaderSync|Document|DocumentFragment|DocumentTouch|DocumentType|DragEvent\n |DynamicsCompressorNode|Element|Entry|EntrySync|ErrorEvent|Event|EventListener|EventSource|EventTarget|FederatedCredential\n |FetchEvent|File|FileEntry|FileEntrySync|FileException|FileList|FileReader|FileReaderSync|FileSystem|FileSystemSync\n |FontFace|FormData|GainNode|Gamepad|GamepadButton|GamepadEvent|Geolocation|GlobalEventHandlers|HTMLAnchorElement\n |HTMLAreaElement|HTMLAudioElement|HTMLBRElement|HTMLBaseElement|HTMLBodyElement|HTMLButtonElement|HTMLCanvasElement\n |HTMLCollection|HTMLContentElement|HTMLDListElement|HTMLDataElement|HTMLDataListElement|HTMLDialogElement|HTMLDivElement\n |HTMLDocument|HTMLElement|HTMLEmbedElement|HTMLFieldSetElement|HTMLFontElement|HTMLFormControlsCollection|HTMLFormElement\n |HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLIFrameElement|HTMLImageElement|HTMLInputElement\n |HTMLKeygenElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTMLLinkElement|HTMLMapElement|HTMLMediaElement\n |HTMLMetaElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLObjectElement|HTMLOptGroupElement|HTMLOptionElement\n |HTMLOptionsCollection|HTMLOutputElement|HTMLParagraphElement|HTMLParamElement|HTMLPreElement|HTMLProgressElement\n |HTMLQuoteElement|HTMLScriptElement|HTMLSelectElement|HTMLShadowElement|HTMLSourceElement|HTMLSpanElement|HTMLStyleElement\n |HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableElement|HTMLTableHeaderCellElement\n |HTMLTableRowElement|HTMLTableSectionElement|HTMLTextAreaElement|HTMLTimeElement|HTMLTitleElement|HTMLTrackElement\n |HTMLUListElement|HTMLUnknownElement|HTMLVideoElement|HashChangeEvent|History|IDBCursor|IDBCursorWithValue|IDBDatabase\n |IDBEnvironment|IDBFactory|IDBIndex|IDBKeyRange|IDBMutableFile|IDBObjectStore|IDBOpenDBRequest|IDBRequest|IDBTransaction\n |IDBVersionChangeEvent|IIRFilterNode|IdentityManager|ImageBitmap|ImageBitmapFactories|ImageData|Index|InputDeviceCapabilities\n |InputEvent|InstallEvent|InstallTrigger|KeyboardEvent|LinkStyle|LocalFileSystem|LocalFileSystemSync|Location|MIDIAccess\n |MIDIConnectionEvent|MIDIInput|MIDIInputMap|MIDIOutputMap|MediaElementAudioSourceNode|MediaError|MediaKeyMessageEvent\n |MediaKeySession|MediaKeyStatusMap|MediaKeySystemAccess|MediaKeySystemConfiguration|MediaKeys|MediaRecorder|MediaStream\n |MediaStreamAudioDestinationNode|MediaStreamAudioSourceNode|MessageChannel|MessageEvent|MessagePort|MouseEvent\n |MutationObserver|MutationRecord|NamedNodeMap|Navigator|NavigatorConcurrentHardware|NavigatorGeolocation|NavigatorID\n |NavigatorLanguage|NavigatorOnLine|Node|NodeFilter|NodeIterator|NodeList|NonDocumentTypeChildNode|Notification\n |OfflineAudioCompletionEvent|OfflineAudioContext|OscillatorNode|PageTransitionEvent|PannerNode|ParentNode|PasswordCredential\n |Path2D|PaymentAddress|PaymentRequest|PaymentResponse|Performance|PerformanceEntry|PerformanceFrameTiming|PerformanceMark\n |PerformanceMeasure|PerformanceNavigation|PerformanceNavigationTiming|PerformanceObserver|PerformanceObserverEntryList\n |PerformanceResourceTiming|PerformanceTiming|PeriodicSyncEvent|PeriodicWave|Plugin|Point|PointerEvent|PopStateEvent\n |PortCollection|Position|PositionError|PositionOptions|PresentationConnectionClosedEvent|PresentationConnectionList\n |PresentationReceiver|ProcessingInstruction|ProgressEvent|PromiseRejectionEvent|PushEvent|PushRegistrationManager\n |RTCCertificate|RTCConfiguration|RTCPeerConnection|RTCSessionDescriptionCallback|RTCStatsReport|RadioNodeList|RandomSource\n |Range|ReadableByteStream|RenderingContext|SVGAElement|SVGAngle|SVGAnimateColorElement|SVGAnimateElement|SVGAnimateMotionElement\n |SVGAnimateTransformElement|SVGAnimatedAngle|SVGAnimatedBoolean|SVGAnimatedEnumeration|SVGAnimatedInteger|SVGAnimatedLength\n |SVGAnimatedLengthList|SVGAnimatedNumber|SVGAnimatedNumberList|SVGAnimatedPoints|SVGAnimatedPreserveAspectRatio\n |SVGAnimatedRect|SVGAnimatedString|SVGAnimatedTransformList|SVGAnimationElement|SVGCircleElement|SVGClipPathElement\n |SVGCursorElement|SVGDefsElement|SVGDescElement|SVGElement|SVGEllipseElement|SVGEvent|SVGFilterElement|SVGFontElement\n |SVGFontFaceElement|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement\n |SVGForeignObjectElement|SVGGElement|SVGGlyphElement|SVGGradientElement|SVGHKernElement|SVGImageElement|SVGLength\n |SVGLengthList|SVGLineElement|SVGLinearGradientElement|SVGMPathElement|SVGMaskElement|SVGMatrix|SVGMissingGlyphElement\n |SVGNumber|SVGNumberList|SVGPathElement|SVGPatternElement|SVGPoint|SVGPolygonElement|SVGPolylineElement|SVGPreserveAspectRatio\n |SVGRadialGradientElement|SVGRect|SVGRectElement|SVGSVGElement|SVGScriptElement|SVGSetElement|SVGStopElement|SVGStringList\n |SVGStylable|SVGStyleElement|SVGSwitchElement|SVGSymbolElement|SVGTRefElement|SVGTSpanElement|SVGTests|SVGTextElement\n |SVGTextPositioningElement|SVGTitleElement|SVGTransform|SVGTransformList|SVGTransformable|SVGUseElement|SVGVKernElement\n |SVGViewElement|ServiceWorker|ServiceWorkerContainer|ServiceWorkerGlobalScope|ServiceWorkerRegistration|ServiceWorkerState\n |ShadowRoot|SharedWorker|SharedWorkerGlobalScope|SourceBufferList|StereoPannerNode|Storage|StorageEvent|StyleSheet\n |StyleSheetList|SubtleCrypto|SyncEvent|Text|TextMetrics|TimeEvent|TimeRanges|Touch|TouchEvent|TouchList|Transferable\n |TreeWalker|UIEvent|USVString|VRDisplayCapabilities|ValidityState|WaveShaperNode|WebGL|WebGLActiveInfo|WebGLBuffer\n |WebGLContextEvent|WebGLFramebuffer|WebGLProgram|WebGLRenderbuffer|WebGLRenderingContext|WebGLShader|WebGLShaderPrecisionFormat\n |WebGLTexture|WebGLTimerQueryEXT|WebGLTransformFeedback|WebGLUniformLocation|WebGLVertexArrayObject|WebGLVertexArrayObjectOES\n |WebSocket|WebSockets|WebVTT|WheelEvent|Window|WindowBase64|WindowEventHandlers|WindowTimers|Worker|WorkerGlobalScope\n |WorkerLocation|WorkerNavigator|XMLHttpRequest|XMLHttpRequestEventTarget|XMLSerializer|XPathExpression|XPathResult\n |XSLTProcessor))\\b(?!\\$)",
2080
+ "captures": {
2081
+ "1": {
2082
+ "name": "support.variable.dom.tsx"
2083
+ },
2084
+ "2": {
2085
+ "name": "support.class.dom.tsx"
2086
+ }
2087
+ }
2088
+ },
2089
+ {
2090
+ "match": "(?x) (\\.) \\s* (?:\n (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE\n |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR\n |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR\n |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR)\n |\n (_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName\n |appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop\n |availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor\n |borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption\n |cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear\n |clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete\n |components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset\n |defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight\n |dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds\n |enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize\n |fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host\n |hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth\n |input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext\n |lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom\n |marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeTypes|multiline|multiple\n |name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName\n |notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight\n |outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer\n |parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling\n |product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText\n |responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts\n |scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove\n |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary\n |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead\n |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile\n |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\\b(?!\\$|\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
2091
+ "captures": {
2092
+ "1": {
2093
+ "name": "punctuation.accessor.tsx"
2094
+ },
2095
+ "2": {
2096
+ "name": "support.constant.dom.tsx"
2097
+ },
2098
+ "3": {
2099
+ "name": "support.variable.property.dom.tsx"
2100
+ }
2101
+ }
2102
+ },
2103
+ {
2104
+ "name": "support.class.node.tsx",
2105
+ "match": "(?x)(?<!\\.|\\$)\\b(Buffer|EventEmitter|Server|Pipe|Socket|REPLServer|ReadStream|WriteStream|Stream\n |Inflate|Deflate|InflateRaw|DeflateRaw|GZip|GUnzip|Unzip|Zip)\\b(?!\\$)"
2106
+ },
2107
+ {
2108
+ "name": "support.module.node.tsx",
2109
+ "match": "(?x)(?<!\\.|\\$)\\b(assert|buffer|child_process|cluster|constants|crypto|dgram|dns|domain|events|fs|http|https|net\n |os|path|punycode|querystring|readline|repl|stream|string_decoder|timers|tls|tty|url|util|vm|zlib)\\b(?!\\$)"
2110
+ },
2111
+ {
2112
+ "match": "(?x)(?<!\\.|\\$)\\b(process)(?:(\\.)(?:\n (arch|argv|config|connected|env|execArgv|execPath|exitCode|mainModule|pid|platform|release|stderr|stdin|stdout|title|version|versions)\n |\n (abort|chdir|cwd|disconnect|exit|[sg]ete?[gu]id|send|[sg]etgroups|initgroups|kill|memoryUsage|nextTick|umask|uptime|hrtime)\n))?\\b(?!\\$)",
2113
+ "captures": {
2114
+ "1": {
2115
+ "name": "support.variable.object.process.tsx"
2116
+ },
2117
+ "2": {
2118
+ "name": "punctuation.accessor.tsx"
2119
+ },
2120
+ "3": {
2121
+ "name": "support.variable.property.process.tsx"
2122
+ },
2123
+ "4": {
2124
+ "name": "support.function.process.tsx"
2125
+ }
2126
+ }
2127
+ },
2128
+ {
2129
+ "match": "(?<!\\.|\\$)\\b(?:(exports)|(module)(?:(\\.)(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)",
2130
+ "captures": {
2131
+ "1": {
2132
+ "name": "support.type.object.module.tsx"
2133
+ },
2134
+ "2": {
2135
+ "name": "support.type.object.module.tsx"
2136
+ },
2137
+ "3": {
2138
+ "name": "punctuation.accessor.tsx"
2139
+ },
2140
+ "4": {
2141
+ "name": "support.type.object.module.tsx"
2142
+ }
2143
+ }
2144
+ },
2145
+ {
2146
+ "name": "support.variable.object.node.tsx",
2147
+ "match": "(?<!\\.|\\$)\\b(global|GLOBAL|root|__dirname|__filename)\\b(?!\\$)"
2148
+ },
2149
+ {
2150
+ "match": "(?x) (\\.) \\s* \n(?:\n (on(?:Rowsinserted|Rowsdelete|Rowenter|Rowexit|Resize|Resizestart|Resizeend|Reset|\n Readystatechange|Mouseout|Mouseover|Mousedown|Mouseup|Mousemove|\n Before(?:cut|deactivate|unload|update|paste|print|editfocus|activate)|\n Blur|Scrolltop|Submit|Select|Selectstart|Selectionchange|Hover|Help|\n Change|Contextmenu|Controlselect|Cut|Cellchange|Clock|Close|Deactivate|\n Datasetchanged|Datasetcomplete|Dataavailable|Drop|Drag|Dragstart|Dragover|\n Dragdrop|Dragenter|Dragend|Dragleave|Dblclick|Unload|Paste|Propertychange|Error|\n Errorupdate|Keydown|Keyup|Keypress|Focus|Load|Activate|Afterupdate|Afterprint|Abort)\n ) |\n (shift|showModelessDialog|showModalDialog|showHelp|scroll|scrollX|scrollByPages|\n scrollByLines|scrollY|scrollTo|stop|strike|sizeToContent|sidebar|signText|sort|\n sup|sub|substr|substring|splice|split|send|set(?:Milliseconds|Seconds|Minutes|Hours|\n Month|Year|FullYear|Date|UTC(?:Milliseconds|Seconds|Minutes|Hours|Month|FullYear|Date)|\n Time|Hotkeys|Cursor|ZOptions|Active|Resizable|RequestHeader)|search|slice|\n savePreferences|small|home|handleEvent|navigate|char|charCodeAt|charAt|concat|\n contextual|confirm|compile|clear|captureEvents|call|createStyleSheet|createPopup|\n createEventObject|to(?:GMTString|UTCString|String|Source|UpperCase|LowerCase|LocaleString)|\n test|taint|taintEnabled|indexOf|italics|disableExternalCapture|dump|detachEvent|unshift|\n untaint|unwatch|updateCommands|join|javaEnabled|pop|push|plugins.refresh|paddings|parse|\n print|prompt|preference|enableExternalCapture|exec|execScript|valueOf|UTC|find|file|\n fileModifiedDate|fileSize|fileCreatedDate|fileUpdatedDate|fixed|fontsize|fontcolor|\n forward|fromCharCode|watch|link|load|lastIndexOf|anchor|attachEvent|atob|apply|alert|\n abort|routeEvents|resize|resizeBy|resizeTo|recalc|returnValue|replace|reverse|reload|\n releaseCapture|releaseEvents|go|get(?:Milliseconds|Seconds|Minutes|Hours|Month|Day|Year|FullYear|\n Time|Date|TimezoneOffset|UTC(?:Milliseconds|Seconds|Minutes|Hours|Day|Month|FullYear|Date)|\n Attention|Selection|ResponseHeader|AllResponseHeaders)|moveBy|moveBelow|moveTo|\n moveToAbsolute|moveAbove|mergeAttributes|match|margins|btoa|big|bold|borderWidths|blink|back\n ) |\n (acceptNode|add|addEventListener|addTextTrack|adoptNode|after|animate|append|\n appendChild|appendData|before|blur|canPlayType|captureStream|\n caretPositionFromPoint|caretRangeFromPoint|checkValidity|clear|click|\n cloneContents|cloneNode|cloneRange|close|closest|collapse|\n compareBoundaryPoints|compareDocumentPosition|comparePoint|contains|\n convertPointFromNode|convertQuadFromNode|convertRectFromNode|createAttribute|\n createAttributeNS|createCaption|createCDATASection|createComment|\n createContextualFragment|createDocument|createDocumentFragment|\n createDocumentType|createElement|createElementNS|createEntityReference|\n createEvent|createExpression|createHTMLDocument|createNodeIterator|\n createNSResolver|createProcessingInstruction|createRange|createShadowRoot|\n createTBody|createTextNode|createTFoot|createTHead|createTreeWalker|delete|\n deleteCaption|deleteCell|deleteContents|deleteData|deleteRow|deleteTFoot|\n deleteTHead|detach|disconnect|dispatchEvent|elementFromPoint|elementsFromPoint|\n enableStyleSheetsForSet|entries|evaluate|execCommand|exitFullscreen|\n exitPointerLock|expand|extractContents|fastSeek|firstChild|focus|forEach|get|\n getAll|getAnimations|getAttribute|getAttributeNames|getAttributeNode|\n getAttributeNodeNS|getAttributeNS|getBoundingClientRect|getBoxQuads|\n getClientRects|getContext|getDestinationInsertionPoints|getElementById|\n getElementsByClassName|getElementsByName|getElementsByTagName|\n getElementsByTagNameNS|getItem|getNamedItem|getSelection|getStartDate|\n getVideoPlaybackQuality|has|hasAttribute|hasAttributeNS|hasAttributes|\n hasChildNodes|hasFeature|hasFocus|importNode|initEvent|insertAdjacentElement|\n insertAdjacentHTML|insertAdjacentText|insertBefore|insertCell|insertData|\n insertNode|insertRow|intersectsNode|isDefaultNamespace|isEqualNode|\n isPointInRange|isSameNode|item|key|keys|lastChild|load|lookupNamespaceURI|\n lookupPrefix|matches|move|moveAttribute|moveAttributeNode|moveChild|\n moveNamedItem|namedItem|nextNode|nextSibling|normalize|observe|open|\n parentNode|pause|play|postMessage|prepend|preventDefault|previousNode|\n previousSibling|probablySupportsContext|queryCommandEnabled|\n queryCommandIndeterm|queryCommandState|queryCommandSupported|queryCommandValue|\n querySelector|querySelectorAll|registerContentHandler|registerElement|\n registerProtocolHandler|releaseCapture|releaseEvents|remove|removeAttribute|\n removeAttributeNode|removeAttributeNS|removeChild|removeEventListener|\n removeItem|replace|replaceChild|replaceData|replaceWith|reportValidity|\n requestFullscreen|requestPointerLock|reset|scroll|scrollBy|scrollIntoView|\n scrollTo|seekToNextFrame|select|selectNode|selectNodeContents|set|setAttribute|\n setAttributeNode|setAttributeNodeNS|setAttributeNS|setCapture|\n setCustomValidity|setEnd|setEndAfter|setEndBefore|setItem|setNamedItem|\n setRangeText|setSelectionRange|setSinkId|setStart|setStartAfter|setStartBefore|\n slice|splitText|stepDown|stepUp|stopImmediatePropagation|stopPropagation|\n submit|substringData|supports|surroundContents|takeRecords|terminate|toBlob|\n toDataURL|toggle|toString|values|write|writeln\n )\n)(?=\\s*\\()",
2151
+ "captures": {
2152
+ "1": {
2153
+ "name": "punctuation.accessor.tsx"
2154
+ },
2155
+ "2": {
2156
+ "name": "support.function.event-handler.tsx"
2157
+ },
2158
+ "3": {
2159
+ "name": "support.function.tsx"
2160
+ },
2161
+ "4": {
2162
+ "name": "support.function.dom.tsx"
2163
+ }
2164
+ }
2165
+ }
2166
+ ]
2167
+ },
2168
+ "function-call": {
2169
+ "begin": "(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
2170
+ "beginCaptures": {
2171
+ "1": {
2172
+ "name": "punctuation.accessor.tsx"
2173
+ },
2174
+ "2": {
2175
+ "name": "entity.name.function.tsx"
2176
+ }
2177
+ },
2178
+ "end": "(?<=\\))",
2179
+ "patterns": [
2180
+ {
2181
+ "include": "#comment"
2182
+ },
2183
+ {
2184
+ "name": "meta.type.parameters.tsx",
2185
+ "begin": "\\<",
2186
+ "beginCaptures": {
2187
+ "0": {
2188
+ "name": "punctuation.definition.typeparameters.begin.tsx"
2189
+ }
2190
+ },
2191
+ "end": "\\>",
2192
+ "endCaptures": {
2193
+ "0": {
2194
+ "name": "punctuation.definition.typeparameters.end.tsx"
2195
+ }
2196
+ },
2197
+ "patterns": [
2198
+ {
2199
+ "include": "#type"
2200
+ },
2201
+ {
2202
+ "include": "#punctuation-comma"
2203
+ }
2204
+ ]
2205
+ },
2206
+ {
2207
+ "include": "#paren-expression"
2208
+ }
2209
+ ]
2210
+ },
2211
+ "identifiers": {
2212
+ "patterns": [
2213
+ {
2214
+ "name": "support.class.tsx",
2215
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\.\\s*prototype\\b(?!\\$))"
2216
+ },
2217
+ {
2218
+ "match": "(?x)(\\.)\\s*(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
2219
+ "captures": {
2220
+ "1": {
2221
+ "name": "punctuation.accessor.tsx"
2222
+ },
2223
+ "2": {
2224
+ "name": "constant.other.object.property.tsx"
2225
+ },
2226
+ "3": {
2227
+ "name": "variable.other.object.property.tsx"
2228
+ }
2229
+ }
2230
+ },
2231
+ {
2232
+ "match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*( (async\\s+)|(function\\s+)| ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)| ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)))",
2233
+ "captures": {
2234
+ "1": {
2235
+ "name": "punctuation.accessor.tsx"
2236
+ },
2237
+ "2": {
2238
+ "name": "entity.name.function.tsx"
2239
+ }
2240
+ }
2241
+ },
2242
+ {
2243
+ "match": "(\\.)\\s*([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
2244
+ "captures": {
2245
+ "1": {
2246
+ "name": "punctuation.accessor.tsx"
2247
+ },
2248
+ "2": {
2249
+ "name": "constant.other.property.tsx"
2250
+ }
2251
+ }
2252
+ },
2253
+ {
2254
+ "match": "(\\.)\\s*([_$[:alpha:]][_$[:alnum:]]*)",
2255
+ "captures": {
2256
+ "1": {
2257
+ "name": "punctuation.accessor.tsx"
2258
+ },
2259
+ "2": {
2260
+ "name": "variable.other.property.tsx"
2261
+ }
2262
+ }
2263
+ },
2264
+ {
2265
+ "match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
2266
+ "captures": {
2267
+ "1": {
2268
+ "name": "constant.other.object.tsx"
2269
+ },
2270
+ "2": {
2271
+ "name": "variable.other.object.tsx"
2272
+ }
2273
+ }
2274
+ },
2275
+ {
2276
+ "name": "constant.other.tsx",
2277
+ "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
2278
+ },
2279
+ {
2280
+ "name": "variable.other.readwrite.tsx",
2281
+ "match": "[_$[:alpha:]][_$[:alnum:]]*"
2282
+ }
2283
+ ]
2284
+ },
2285
+ "cast": {
2286
+ "patterns": [
2287
+ {
2288
+ "include": "#jsx"
2289
+ }
2290
+ ]
2291
+ },
2292
+ "new-expr": {
2293
+ "name": "new.expr.tsx",
2294
+ "begin": "(?<!\\.|\\$)\\b(new)\\b(?!\\$)",
2295
+ "beginCaptures": {
2296
+ "1": {
2297
+ "name": "keyword.operator.new.tsx"
2298
+ }
2299
+ },
2300
+ "end": "(?<=\\))|(?=[;),]|$|((?<!\\.|\\$)\\bnew\\b(?!\\$)))",
2301
+ "patterns": [
2302
+ {
2303
+ "include": "#paren-expression"
2304
+ },
2305
+ {
2306
+ "include": "#type"
2307
+ }
2308
+ ]
2309
+ },
2310
+ "object-member": {
2311
+ "patterns": [
2312
+ {
2313
+ "include": "#comment"
2314
+ },
2315
+ {
2316
+ "include": "#method-declaration"
2317
+ },
2318
+ {
2319
+ "name": "meta.object.member.tsx",
2320
+ "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[[^\\]]*\\]))\\s*:)",
2321
+ "end": "(?=,|\\})",
2322
+ "patterns": [
2323
+ {
2324
+ "name": "meta.object-literal.key.tsx",
2325
+ "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[[^\\]]*\\]))\\s*:)",
2326
+ "end": ":",
2327
+ "endCaptures": {
2328
+ "0": {
2329
+ "name": "punctuation.separator.key-value.tsx"
2330
+ }
2331
+ },
2332
+ "patterns": [
2333
+ {
2334
+ "include": "#string"
2335
+ },
2336
+ {
2337
+ "include": "#array-literal"
2338
+ }
2339
+ ]
2340
+ },
2341
+ {
2342
+ "include": "#expression"
2343
+ }
2344
+ ]
2345
+ },
2346
+ {
2347
+ "name": "meta.object.member.tsx",
2348
+ "begin": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)(?=\\s*( (async\\s+)|(function\\s+)| ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)| ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>))))",
2349
+ "beginCaptures": {
2350
+ "0": {
2351
+ "name": "meta.object-literal.key.tsx"
2352
+ },
2353
+ "1": {
2354
+ "name": "entity.name.function.tsx"
2355
+ },
2356
+ "2": {
2357
+ "name": "punctuation.separator.key-value.tsx"
2358
+ }
2359
+ },
2360
+ "end": "(?=,|\\})",
2361
+ "patterns": [
2362
+ {
2363
+ "include": "#expression"
2364
+ }
2365
+ ]
2366
+ },
2367
+ {
2368
+ "name": "meta.object.member.tsx",
2369
+ "begin": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(:)",
2370
+ "beginCaptures": {
2371
+ "0": {
2372
+ "name": "meta.object-literal.key.tsx"
2373
+ },
2374
+ "1": {
2375
+ "name": "punctuation.separator.key-value.tsx"
2376
+ }
2377
+ },
2378
+ "end": "(?=,|\\})",
2379
+ "patterns": [
2380
+ {
2381
+ "include": "#expression"
2382
+ }
2383
+ ]
2384
+ },
2385
+ {
2386
+ "name": "meta.object.member.tsx",
2387
+ "begin": "\\.\\.\\.",
2388
+ "beginCaptures": {
2389
+ "0": {
2390
+ "name": "keyword.operator.spread.tsx"
2391
+ }
2392
+ },
2393
+ "end": "(?=,|\\})",
2394
+ "patterns": [
2395
+ {
2396
+ "include": "#expression"
2397
+ }
2398
+ ]
2399
+ },
2400
+ {
2401
+ "name": "meta.object.member.tsx",
2402
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$)",
2403
+ "captures": {
2404
+ "1": {
2405
+ "name": "variable.other.readwrite.tsx"
2406
+ }
2407
+ }
2408
+ },
2409
+ {
2410
+ "include": "#punctuation-comma"
2411
+ }
2412
+ ]
2413
+ },
2414
+ "expression-operators": {
2415
+ "patterns": [
2416
+ {
2417
+ "name": "keyword.control.flow.tsx",
2418
+ "match": "(?<!\\.|\\$)\\b(await)\\b(?!\\$)"
2419
+ },
2420
+ {
2421
+ "name": "keyword.operator.expression.delete.tsx",
2422
+ "match": "(?<!\\.|\\$)\\bdelete\\b(?!\\$)"
2423
+ },
2424
+ {
2425
+ "name": "keyword.operator.expression.in.tsx",
2426
+ "match": "(?<!\\.|\\$)\\bin\\b(?!\\$)"
2427
+ },
2428
+ {
2429
+ "name": "keyword.operator.expression.of.tsx",
2430
+ "match": "(?<!\\.|\\$)\\bof\\b(?!\\$)"
2431
+ },
2432
+ {
2433
+ "name": "keyword.operator.expression.instanceof.tsx",
2434
+ "match": "(?<!\\.|\\$)\\binstanceof\\b(?!\\$)"
2435
+ },
2436
+ {
2437
+ "name": "keyword.operator.new.tsx",
2438
+ "match": "(?<!\\.|\\$)\\bnew\\b(?!\\$)"
2439
+ },
2440
+ {
2441
+ "include": "#typeof-operator"
2442
+ },
2443
+ {
2444
+ "name": "keyword.operator.expression.void.tsx",
2445
+ "match": "(?<!\\.|\\$)\\bvoid\\b(?!\\$)"
2446
+ },
2447
+ {
2448
+ "begin": "(?<!\\.|\\$)\\bas\\b(?!\\$)",
2449
+ "beginCaptures": {
2450
+ "0": {
2451
+ "name": "keyword.control.as.tsx"
2452
+ }
2453
+ },
2454
+ "end": "(?=$|[;,:})\\]])",
2455
+ "patterns": [
2456
+ {
2457
+ "include": "#type"
2458
+ }
2459
+ ]
2460
+ },
2461
+ {
2462
+ "name": "keyword.operator.spread.tsx",
2463
+ "match": "\\.\\.\\."
2464
+ },
2465
+ {
2466
+ "name": "keyword.operator.assignment.compound.tsx",
2467
+ "match": "\\*=|(?<!\\()/=|%=|\\+=|\\-="
2468
+ },
2469
+ {
2470
+ "name": "keyword.operator.assignment.compound.bitwise.tsx",
2471
+ "match": "\\&=|\\^=|<<=|>>=|>>>=|\\|="
2472
+ },
2473
+ {
2474
+ "name": "keyword.operator.bitwise.shift.tsx",
2475
+ "match": "<<|>>>|>>"
2476
+ },
2477
+ {
2478
+ "name": "keyword.operator.comparison.tsx",
2479
+ "match": "===|!==|==|!="
2480
+ },
2481
+ {
2482
+ "name": "keyword.operator.relational.tsx",
2483
+ "match": "<=|>=|<>|<|>"
2484
+ },
2485
+ {
2486
+ "name": "keyword.operator.logical.tsx",
2487
+ "match": "\\!|&&|\\|\\|"
2488
+ },
2489
+ {
2490
+ "name": "keyword.operator.bitwise.tsx",
2491
+ "match": "\\&|~|\\^|\\|"
2492
+ },
2493
+ {
2494
+ "name": "keyword.operator.assignment.tsx",
2495
+ "match": "\\="
2496
+ },
2497
+ {
2498
+ "name": "keyword.operator.decrement.tsx",
2499
+ "match": "--"
2500
+ },
2501
+ {
2502
+ "name": "keyword.operator.increment.tsx",
2503
+ "match": "\\+\\+"
2504
+ },
2505
+ {
2506
+ "name": "keyword.operator.arithmetic.tsx",
2507
+ "match": "%|\\*|/|-|\\+"
2508
+ }
2509
+ ]
2510
+ },
2511
+ "typeof-operator": {
2512
+ "name": "keyword.operator.expression.typeof.tsx",
2513
+ "match": "(?<!\\.|\\$)\\btypeof\\b(?!\\$)"
2514
+ },
2515
+ "arrow-function": {
2516
+ "patterns": [
2517
+ {
2518
+ "name": "meta.arrow.tsx",
2519
+ "match": "(?<!\\.|\\$)(\\basync)(?=\\s*[<(])",
2520
+ "captures": {
2521
+ "1": {
2522
+ "name": "storage.modifier.async.tsx"
2523
+ }
2524
+ }
2525
+ },
2526
+ {
2527
+ "name": "meta.arrow.tsx",
2528
+ "match": "(?:(?<!\\.|\\$)(\\basync)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?==>)",
2529
+ "captures": {
2530
+ "1": {
2531
+ "name": "storage.modifier.async.tsx"
2532
+ },
2533
+ "2": {
2534
+ "name": "variable.parameter.tsx"
2535
+ }
2536
+ }
2537
+ },
2538
+ {
2539
+ "name": "meta.arrow.tsx",
2540
+ "begin": "(?x)\\s*(?=(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)",
2541
+ "end": "(?==>)",
2542
+ "patterns": [
2543
+ {
2544
+ "include": "#comment"
2545
+ },
2546
+ {
2547
+ "include": "#type-parameters"
2548
+ },
2549
+ {
2550
+ "include": "#function-parameters"
2551
+ },
2552
+ {
2553
+ "include": "#arrow-return-type"
2554
+ }
2555
+ ]
2556
+ },
2557
+ {
2558
+ "name": "meta.arrow.tsx",
2559
+ "begin": "=>",
2560
+ "beginCaptures": {
2561
+ "0": {
2562
+ "name": "storage.type.function.arrow.tsx"
2563
+ }
2564
+ },
2565
+ "end": "(?<=\\})|((?!\\{)(?=\\S))",
2566
+ "patterns": [
2567
+ {
2568
+ "include": "#decl-block"
2569
+ },
2570
+ {
2571
+ "include": "#expression"
2572
+ }
2573
+ ]
2574
+ }
2575
+ ]
2576
+ },
2577
+ "arrow-return-type": {
2578
+ "name": "meta.return.type.arrow.tsx",
2579
+ "begin": "(?<=\\))\\s*(:)",
2580
+ "beginCaptures": {
2581
+ "1": {
2582
+ "name": "keyword.operator.type.annotation.tsx"
2583
+ }
2584
+ },
2585
+ "end": "(?<!:)((?=$)|(?==>|;|//))",
2586
+ "patterns": [
2587
+ {
2588
+ "include": "#type-predicate-operator"
2589
+ },
2590
+ {
2591
+ "include": "#type"
2592
+ }
2593
+ ]
2594
+ },
2595
+ "punctuation-comma": {
2596
+ "name": "punctuation.separator.comma.tsx",
2597
+ "match": ","
2598
+ },
2599
+ "punctuation-semicolon": {
2600
+ "name": "punctuation.terminator.statement.tsx",
2601
+ "match": ";"
2602
+ },
2603
+ "punctuation-accessor": {
2604
+ "name": "punctuation.accessor.tsx",
2605
+ "match": "\\."
2606
+ },
2607
+ "paren-expression": {
2608
+ "begin": "\\(",
2609
+ "beginCaptures": {
2610
+ "0": {
2611
+ "name": "meta.brace.round.tsx"
2612
+ }
2613
+ },
2614
+ "end": "\\)",
2615
+ "endCaptures": {
2616
+ "0": {
2617
+ "name": "meta.brace.round.tsx"
2618
+ }
2619
+ },
2620
+ "patterns": [
2621
+ {
2622
+ "include": "#expression"
2623
+ },
2624
+ {
2625
+ "include": "#punctuation-comma"
2626
+ }
2627
+ ]
2628
+ },
2629
+ "qstring-double": {
2630
+ "name": "string.quoted.double.tsx",
2631
+ "begin": "\"",
2632
+ "beginCaptures": {
2633
+ "0": {
2634
+ "name": "punctuation.definition.string.begin.tsx"
2635
+ }
2636
+ },
2637
+ "end": "(\")|((?:[^\\\\\\n])$)",
2638
+ "endCaptures": {
2639
+ "1": {
2640
+ "name": "punctuation.definition.string.end.tsx"
2641
+ },
2642
+ "2": {
2643
+ "name": "invalid.illegal.newline.tsx"
2644
+ }
2645
+ },
2646
+ "patterns": [
2647
+ {
2648
+ "include": "#string-character-escape"
2649
+ }
2650
+ ]
2651
+ },
2652
+ "qstring-single": {
2653
+ "name": "string.quoted.single.tsx",
2654
+ "begin": "'",
2655
+ "beginCaptures": {
2656
+ "0": {
2657
+ "name": "punctuation.definition.string.begin.tsx"
2658
+ }
2659
+ },
2660
+ "end": "(\\')|((?:[^\\\\\\n])$)",
2661
+ "endCaptures": {
2662
+ "1": {
2663
+ "name": "punctuation.definition.string.end.tsx"
2664
+ },
2665
+ "2": {
2666
+ "name": "invalid.illegal.newline.tsx"
2667
+ }
2668
+ },
2669
+ "patterns": [
2670
+ {
2671
+ "include": "#string-character-escape"
2672
+ }
2673
+ ]
2674
+ },
2675
+ "regex": {
2676
+ "patterns": [
2677
+ {
2678
+ "name": "string.regex.tsx",
2679
+ "begin": "(?<=[=(:,\\[?+!]|return|case|=>|&&|\\|\\||\\*\\/)\\s*(/)(?![/*+?])(?=.*/)",
2680
+ "beginCaptures": {
2681
+ "1": {
2682
+ "name": "punctuation.definition.string.begin.tsx"
2683
+ }
2684
+ },
2685
+ "end": "(/)([gimuy]*)",
2686
+ "endCaptures": {
2687
+ "1": {
2688
+ "name": "punctuation.definition.string.end.tsx"
2689
+ },
2690
+ "2": {
2691
+ "name": "keyword.other.tsx"
2692
+ }
2693
+ },
2694
+ "patterns": [
2695
+ {
2696
+ "include": "#regexp"
2697
+ }
2698
+ ]
2699
+ },
2700
+ {
2701
+ "name": "string.regex.tsx",
2702
+ "begin": "/(?![/*])(?=(?:[^/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+/(?![/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))",
2703
+ "beginCaptures": {
2704
+ "0": {
2705
+ "name": "punctuation.definition.string.begin.tsx"
2706
+ }
2707
+ },
2708
+ "end": "(/)([gimuy]*)",
2709
+ "endCaptures": {
2710
+ "1": {
2711
+ "name": "punctuation.definition.string.end.tsx"
2712
+ },
2713
+ "2": {
2714
+ "name": "keyword.other.tsx"
2715
+ }
2716
+ },
2717
+ "patterns": [
2718
+ {
2719
+ "include": "#regexp"
2720
+ }
2721
+ ]
2722
+ }
2723
+ ]
2724
+ },
2725
+ "regexp": {
2726
+ "patterns": [
2727
+ {
2728
+ "name": "keyword.control.anchor.regexp",
2729
+ "match": "\\\\[bB]|\\^|\\$"
2730
+ },
2731
+ {
2732
+ "name": "keyword.other.back-reference.regexp",
2733
+ "match": "\\\\[1-9]\\d*"
2734
+ },
2735
+ {
2736
+ "name": "keyword.operator.quantifier.regexp",
2737
+ "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??"
2738
+ },
2739
+ {
2740
+ "name": "keyword.operator.or.regexp",
2741
+ "match": "\\|"
2742
+ },
2743
+ {
2744
+ "name": "meta.group.assertion.regexp",
2745
+ "begin": "(\\()((\\?=)|(\\?!))",
2746
+ "beginCaptures": {
2747
+ "1": {
2748
+ "name": "punctuation.definition.group.regexp"
2749
+ },
2750
+ "2": {
2751
+ "name": "punctuation.definition.group.assertion.regexp"
2752
+ },
2753
+ "3": {
2754
+ "name": "meta.assertion.look-ahead.regexp"
2755
+ },
2756
+ "4": {
2757
+ "name": "meta.assertion.negative-look-ahead.regexp"
2758
+ }
2759
+ },
2760
+ "end": "(\\))",
2761
+ "endCaptures": {
2762
+ "1": {
2763
+ "name": "punctuation.definition.group.regexp"
2764
+ }
2765
+ },
2766
+ "patterns": [
2767
+ {
2768
+ "include": "#regexp"
2769
+ }
2770
+ ]
2771
+ },
2772
+ {
2773
+ "name": "meta.group.regexp",
2774
+ "begin": "\\((\\?:)?",
2775
+ "beginCaptures": {
2776
+ "0": {
2777
+ "name": "punctuation.definition.group.regexp"
2778
+ },
2779
+ "1": {
2780
+ "name": "punctuation.definition.group.capture.regexp"
2781
+ }
2782
+ },
2783
+ "end": "\\)",
2784
+ "endCaptures": {
2785
+ "0": {
2786
+ "name": "punctuation.definition.group.regexp"
2787
+ }
2788
+ },
2789
+ "patterns": [
2790
+ {
2791
+ "include": "#regexp"
2792
+ }
2793
+ ]
2794
+ },
2795
+ {
2796
+ "name": "constant.other.character-class.set.regexp",
2797
+ "begin": "(\\[)(\\^)?",
2798
+ "beginCaptures": {
2799
+ "1": {
2800
+ "name": "punctuation.definition.character-class.regexp"
2801
+ },
2802
+ "2": {
2803
+ "name": "keyword.operator.negation.regexp"
2804
+ }
2805
+ },
2806
+ "end": "(\\])",
2807
+ "endCaptures": {
2808
+ "1": {
2809
+ "name": "punctuation.definition.character-class.regexp"
2810
+ }
2811
+ },
2812
+ "patterns": [
2813
+ {
2814
+ "name": "constant.other.character-class.range.regexp",
2815
+ "match": "(?:.|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))",
2816
+ "captures": {
2817
+ "1": {
2818
+ "name": "constant.character.numeric.regexp"
2819
+ },
2820
+ "2": {
2821
+ "name": "constant.character.control.regexp"
2822
+ },
2823
+ "3": {
2824
+ "name": "constant.character.escape.backslash.regexp"
2825
+ },
2826
+ "4": {
2827
+ "name": "constant.character.numeric.regexp"
2828
+ },
2829
+ "5": {
2830
+ "name": "constant.character.control.regexp"
2831
+ },
2832
+ "6": {
2833
+ "name": "constant.character.escape.backslash.regexp"
2834
+ }
2835
+ }
2836
+ },
2837
+ {
2838
+ "include": "#regex-character-class"
2839
+ }
2840
+ ]
2841
+ },
2842
+ {
2843
+ "include": "#regex-character-class"
2844
+ }
2845
+ ]
2846
+ },
2847
+ "regex-character-class": {
2848
+ "patterns": [
2849
+ {
2850
+ "name": "constant.other.character-class.regexp",
2851
+ "match": "\\\\[wWsSdDtrnvf]|\\."
2852
+ },
2853
+ {
2854
+ "name": "constant.character.numeric.regexp",
2855
+ "match": "\\\\([0-7]{3}|x\\h\\h|u\\h\\h\\h\\h)"
2856
+ },
2857
+ {
2858
+ "name": "constant.character.control.regexp",
2859
+ "match": "\\\\c[A-Z]"
2860
+ },
2861
+ {
2862
+ "name": "constant.character.escape.backslash.regexp",
2863
+ "match": "\\\\."
2864
+ }
2865
+ ]
2866
+ },
2867
+ "string": {
2868
+ "name": "string.tsx",
2869
+ "patterns": [
2870
+ {
2871
+ "include": "#qstring-single"
2872
+ },
2873
+ {
2874
+ "include": "#qstring-double"
2875
+ }
2876
+ ]
2877
+ },
2878
+ "template": {
2879
+ "name": "string.template.tsx",
2880
+ "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
2881
+ "beginCaptures": {
2882
+ "1": {
2883
+ "name": "entity.name.function.tagged-template.tsx"
2884
+ },
2885
+ "2": {
2886
+ "name": "punctuation.definition.string.template.begin.tsx"
2887
+ }
2888
+ },
2889
+ "end": "`",
2890
+ "endCaptures": {
2891
+ "0": {
2892
+ "name": "punctuation.definition.string.template.end.tsx"
2893
+ }
2894
+ },
2895
+ "patterns": [
2896
+ {
2897
+ "include": "#template-substitution-element"
2898
+ },
2899
+ {
2900
+ "include": "#string-character-escape"
2901
+ }
2902
+ ]
2903
+ },
2904
+ "string-character-escape": {
2905
+ "name": "constant.character.escape.tsx",
2906
+ "match": "\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)"
2907
+ },
2908
+ "template-substitution-element": {
2909
+ "name": "meta.template.expression.tsx",
2910
+ "begin": "\\$\\{",
2911
+ "beginCaptures": {
2912
+ "0": {
2913
+ "name": "punctuation.definition.template-expression.begin.tsx"
2914
+ }
2915
+ },
2916
+ "end": "\\}",
2917
+ "endCaptures": {
2918
+ "0": {
2919
+ "name": "punctuation.definition.template-expression.end.tsx"
2920
+ }
2921
+ },
2922
+ "patterns": [
2923
+ {
2924
+ "include": "#expression"
2925
+ }
2926
+ ]
2927
+ },
2928
+ "literal": {
2929
+ "name": "literal.tsx",
2930
+ "patterns": [
2931
+ {
2932
+ "include": "#numeric-literal"
2933
+ },
2934
+ {
2935
+ "include": "#boolean-literal"
2936
+ },
2937
+ {
2938
+ "include": "#null-literal"
2939
+ },
2940
+ {
2941
+ "include": "#undefined-literal"
2942
+ },
2943
+ {
2944
+ "include": "#numericConstant-literal"
2945
+ },
2946
+ {
2947
+ "include": "#array-literal"
2948
+ },
2949
+ {
2950
+ "include": "#this-literal"
2951
+ },
2952
+ {
2953
+ "include": "#super-literal"
2954
+ }
2955
+ ]
2956
+ },
2957
+ "array-literal": {
2958
+ "name": "meta.array.literal.tsx",
2959
+ "begin": "\\[",
2960
+ "beginCaptures": {
2961
+ "0": {
2962
+ "name": "meta.brace.square.tsx"
2963
+ }
2964
+ },
2965
+ "end": "\\]",
2966
+ "endCaptures": {
2967
+ "0": {
2968
+ "name": "meta.brace.square.tsx"
2969
+ }
2970
+ },
2971
+ "patterns": [
2972
+ {
2973
+ "include": "#expression"
2974
+ },
2975
+ {
2976
+ "include": "#punctuation-comma"
2977
+ }
2978
+ ]
2979
+ },
2980
+ "numeric-literal": {
2981
+ "patterns": [
2982
+ {
2983
+ "name": "constant.numeric.hex.tsx",
2984
+ "match": "\\b(?<!\\$)0(x|X)[0-9a-fA-F]+\\b(?!\\$)"
2985
+ },
2986
+ {
2987
+ "name": "constant.numeric.binary.tsx",
2988
+ "match": "\\b(?<!\\$)0(b|B)[01]+\\b(?!\\$)"
2989
+ },
2990
+ {
2991
+ "name": "constant.numeric.octal.tsx",
2992
+ "match": "\\b(?<!\\$)0(o|O)?[0-7]+\\b(?!\\$)"
2993
+ },
2994
+ {
2995
+ "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9]+(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # 1.1E+3\n (?:\\b[0-9]+(\\.)[eE][+-]?[0-9]+\\b)| # 1.E+3\n (?:\\B(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # .1E+3\n (?:\\b[0-9]+[eE][+-]?[0-9]+\\b)| # 1E+3\n (?:\\b[0-9]+(\\.)[0-9]+\\b)| # 1.1\n (?:\\b[0-9]+(\\.)\\B)| # 1.\n (?:\\B(\\.)[0-9]+\\b)| # .1\n (?:\\b[0-9]+\\b(?!\\.)) # 1\n)(?!\\$)",
2996
+ "captures": {
2997
+ "0": {
2998
+ "name": "constant.numeric.decimal.tsx"
2999
+ },
3000
+ "1": {
3001
+ "name": "meta.delimiter.decimal.period.tsx"
3002
+ },
3003
+ "2": {
3004
+ "name": "meta.delimiter.decimal.period.tsx"
3005
+ },
3006
+ "3": {
3007
+ "name": "meta.delimiter.decimal.period.tsx"
3008
+ },
3009
+ "4": {
3010
+ "name": "meta.delimiter.decimal.period.tsx"
3011
+ },
3012
+ "5": {
3013
+ "name": "meta.delimiter.decimal.period.tsx"
3014
+ },
3015
+ "6": {
3016
+ "name": "meta.delimiter.decimal.period.tsx"
3017
+ }
3018
+ }
3019
+ }
3020
+ ]
3021
+ },
3022
+ "boolean-literal": {
3023
+ "patterns": [
3024
+ {
3025
+ "name": "constant.language.boolean.true.tsx",
3026
+ "match": "(?<!\\.|\\$)\\btrue\\b(?!\\$)"
3027
+ },
3028
+ {
3029
+ "name": "constant.language.boolean.false.tsx",
3030
+ "match": "(?<!\\.|\\$)\\bfalse\\b(?!\\$)"
3031
+ }
3032
+ ]
3033
+ },
3034
+ "null-literal": {
3035
+ "name": "constant.language.null.tsx",
3036
+ "match": "(?<!\\.|\\$)\\bnull\\b(?!\\$)"
3037
+ },
3038
+ "this-literal": {
3039
+ "name": "variable.language.this.tsx",
3040
+ "match": "(?<!\\.|\\$)\\bthis\\b(?!\\$)"
3041
+ },
3042
+ "super-literal": {
3043
+ "name": "variable.language.super.tsx",
3044
+ "match": "(?<!\\.|\\$)\\bsuper\\b(?!\\$)"
3045
+ },
3046
+ "undefined-literal": {
3047
+ "name": "constant.language.undefined.tsx",
3048
+ "match": "(?<!\\.|\\$)\\bundefined\\b(?!\\$)"
3049
+ },
3050
+ "numericConstant-literal": {
3051
+ "patterns": [
3052
+ {
3053
+ "name": "constant.language.nan.tsx",
3054
+ "match": "(?<!\\.|\\$)\\bNaN\\b(?!\\$)"
3055
+ },
3056
+ {
3057
+ "name": "constant.language.infinity.tsx",
3058
+ "match": "(?<!\\.|\\$)\\bInfinity\\b(?!\\$)"
3059
+ }
3060
+ ]
3061
+ },
3062
+ "access-modifier": {
3063
+ "name": "storage.modifier.tsx",
3064
+ "match": "(?<!\\.|\\$)\\b(abstract|public|protected|private|readonly|static)\\b(?!\\$)"
3065
+ },
3066
+ "property-accessor": {
3067
+ "name": "storage.type.property.tsx",
3068
+ "match": "(?<!\\.|\\$)\\b(get|set)\\b(?!\\$)"
3069
+ },
3070
+ "comment": {
3071
+ "patterns": [
3072
+ {
3073
+ "name": "comment.block.documentation.tsx",
3074
+ "begin": "/\\*\\*(?!/)",
3075
+ "end": "\\*/",
3076
+ "captures": {
3077
+ "0": {
3078
+ "name": "punctuation.definition.comment.tsx"
3079
+ }
3080
+ },
3081
+ "patterns": [
3082
+ {
3083
+ "include": "#docblock"
3084
+ }
3085
+ ]
3086
+ },
3087
+ {
3088
+ "name": "comment.block.tsx",
3089
+ "begin": "/\\*",
3090
+ "end": "\\*/",
3091
+ "captures": {
3092
+ "0": {
3093
+ "name": "punctuation.definition.comment.tsx"
3094
+ }
3095
+ }
3096
+ },
3097
+ {
3098
+ "begin": "(^[ \\t]+)?(?=//)",
3099
+ "beginCaptures": {
3100
+ "1": {
3101
+ "name": "punctuation.whitespace.comment.leading.tsx"
3102
+ }
3103
+ },
3104
+ "end": "(?=$)",
3105
+ "patterns": [
3106
+ {
3107
+ "name": "comment.line.double-slash.tsx",
3108
+ "begin": "//",
3109
+ "beginCaptures": {
3110
+ "0": {
3111
+ "name": "punctuation.definition.comment.tsx"
3112
+ }
3113
+ },
3114
+ "end": "(?=$)"
3115
+ }
3116
+ ]
3117
+ }
3118
+ ]
3119
+ },
3120
+ "docblock": {
3121
+ "patterns": [
3122
+ {
3123
+ "name": "storage.type.class.jsdoc",
3124
+ "match": "(?<!\\w)@(abstract|access|alias|arg|argument|async|attribute|augments|author|beta|borrows|bubbes|callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright|default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exports?|extends|extension|extension_for|extensionfor|external|file|fileoverview|final|fires|for|function|global|host|ignore|implements|inherit[Dd]oc|inner|instance|interface|kind|lends|license|listens|main|member|memberof|method|mixex|mixins?|module|name|namespace|nocollapse|nosideeffects|override|overview|package|param|preserve|private|prop|property|protected|public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation|version|virtual|writeOnce)\\b"
3125
+ },
3126
+ {
3127
+ "match": "(?x)\n(?:(?<=@param)|(?<=@arg)|(?<=@argument)|(?<=@type))\n\\s+\n({(?:\n \\* | # {*} any type\n \\? | # {?} unknown type\n (?: # Check for a prefix\n \\? | # {?string} nullable type\n ! | # {!string} non-nullable type\n \\.{3} # {...string} variable number of parameters\n )?\n (?:\n \\( # Opening bracket of multiple types with parenthesis {(string|number)}\n [a-zA-Z_$]+\n (?:\n (?:\n [\\w$]*\n (?:\\[\\])? # {(string[]|number)} type application, an array of strings or a number\n ) |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n (?:\n [\\w$]*\n (?:\\[\\])? # {(string|number[])} type application, a string or an array of numbers\n ) |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n \\) |\n [a-zA-Z_$]+\n (?:\n (?:\n [\\w$]*\n (?:\\[\\])? # {string[]|number} type application, an array of strings or a number\n ) |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n )\n # Check for suffix\n (?:\\[\\])? # {string[]} type application, an array of strings\n =? # {string=} optional parameter\n)})\n\\s+\n(\n \\[ # [foo] optional parameter\n \\s*\n (?:\n [a-zA-Z_$][\\w$]*\n (?:\n (?:\\[\\])? # Foo[].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [a-zA-Z_$][\\w$]*\n )*\n (?:\n \\s*\n = # [foo=bar] Default parameter value\n \\s*\n [\\w$\\s]*\n )?\n )\n \\s*\n \\] |\n (?:\n [a-zA-Z_$][\\w$]*\n (?:\n (?:\\[\\])? # Foo[].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [a-zA-Z_$][\\w$]*\n )*\n )?\n)\n\\s+\n(?:-\\s+)? # optional hyphen before the description\n((?:(?!\\*\\/).)*) # The type description",
3128
+ "captures": {
3129
+ "0": {
3130
+ "name": "other.meta.jsdoc"
3131
+ },
3132
+ "1": {
3133
+ "name": "entity.name.type.instance.jsdoc"
3134
+ },
3135
+ "2": {
3136
+ "name": "variable.other.jsdoc"
3137
+ },
3138
+ "3": {
3139
+ "name": "other.description.jsdoc"
3140
+ }
3141
+ }
3142
+ },
3143
+ {
3144
+ "match": "(?x)\n({(?:\n \\* | # {*} any type\n \\? | # {?} unknown type\n\n (?: # Check for a prefix\n \\? | # {?string} nullable type\n ! | # {!string} non-nullable type\n \\.{3} # {...string} variable number of parameters\n )?\n\n (?:\n \\( # Opening bracket of multiple types with parenthesis {(string|number)}\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n \\) |\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n )\n # Check for suffix\n (?:\\[\\])? # {string[]} type application, an array of strings\n =? # {string=} optional parameter\n)})\n\\s+\n(?:-\\s+)? # optional hyphen before the description\n((?:(?!\\*\\/).)*) # The type description",
3145
+ "captures": {
3146
+ "0": {
3147
+ "name": "other.meta.jsdoc"
3148
+ },
3149
+ "1": {
3150
+ "name": "entity.name.type.instance.jsdoc"
3151
+ },
3152
+ "2": {
3153
+ "name": "other.description.jsdoc"
3154
+ }
3155
+ }
3156
+ }
3157
+ ]
3158
+ },
3159
+ "jsx-tag-attributes": {
3160
+ "patterns": [
3161
+ {
3162
+ "include": "#jsx-tag-attribute-name"
3163
+ },
3164
+ {
3165
+ "include": "#jsx-tag-attribute-assignment"
3166
+ },
3167
+ {
3168
+ "include": "#jsx-string-double-quoted"
3169
+ },
3170
+ {
3171
+ "include": "#jsx-string-single-quoted"
3172
+ },
3173
+ {
3174
+ "include": "#jsx-evaluated-code"
3175
+ }
3176
+ ]
3177
+ },
3178
+ "jsx-tag-attribute-name": {
3179
+ "name": "meta.tag.attribute-name.tsx",
3180
+ "match": "(?x)\n \\s*\n ([_$a-zA-Z][-$\\w]*)\n (?=\\s|=|/?>|/\\*|//)",
3181
+ "captures": {
3182
+ "1": {
3183
+ "name": "entity.other.attribute-name.tsx"
3184
+ }
3185
+ }
3186
+ },
3187
+ "jsx-tag-attribute-assignment": {
3188
+ "name": "keyword.operator.assignment.tsx",
3189
+ "match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))"
3190
+ },
3191
+ "jsx-string-double-quoted": {
3192
+ "name": "string.jsxAttributeValue.quoted.double.tsx",
3193
+ "begin": "\"",
3194
+ "end": "\"",
3195
+ "beginCaptures": {
3196
+ "0": {
3197
+ "name": "punctuation.definition.string.jsxAttributeValue.begin.tsx"
3198
+ }
3199
+ },
3200
+ "endCaptures": {
3201
+ "0": {
3202
+ "name": "punctuation.definition.string.jsxAttributeValue.end.tsx"
3203
+ }
3204
+ },
3205
+ "patterns": [
3206
+ {
3207
+ "include": "#jsx-attributeValue-entities"
3208
+ }
3209
+ ]
3210
+ },
3211
+ "jsx-string-single-quoted": {
3212
+ "name": "string.jsxAttributeValue.quoted.single.tsx",
3213
+ "begin": "'",
3214
+ "end": "'",
3215
+ "beginCaptures": {
3216
+ "0": {
3217
+ "name": "punctuation.definition.string.jsxAttributeValue.begin.tsx"
3218
+ }
3219
+ },
3220
+ "endCaptures": {
3221
+ "0": {
3222
+ "name": "punctuation.definition.string.jsxAttributeValue.end.tsx"
3223
+ }
3224
+ },
3225
+ "patterns": [
3226
+ {
3227
+ "include": "#jsx-attributeValue-entities"
3228
+ }
3229
+ ]
3230
+ },
3231
+ "jsx-entities": {
3232
+ "patterns": [
3233
+ {
3234
+ "name": "constant.character.entity.tsx",
3235
+ "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
3236
+ "captures": {
3237
+ "1": {
3238
+ "name": "punctuation.definition.entity.tsx"
3239
+ },
3240
+ "3": {
3241
+ "name": "punctuation.definition.entity.tsx"
3242
+ }
3243
+ }
3244
+ },
3245
+ {
3246
+ "name": "invalid.illegal.bad-ampersand.tsx",
3247
+ "match": "&"
3248
+ }
3249
+ ]
3250
+ },
3251
+ "jsx-attributeValue-entities": {
3252
+ "patterns": [
3253
+ {
3254
+ "name": "constant.character.entity.jsxAttributeValue.tsx",
3255
+ "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
3256
+ "captures": {
3257
+ "1": {
3258
+ "name": "punctuation.definition.entity.jsxAttributeValue.tsx"
3259
+ },
3260
+ "3": {
3261
+ "name": "punctuation.definition.entity.jsxAttributeValue.tsx"
3262
+ }
3263
+ }
3264
+ },
3265
+ {
3266
+ "name": "invalid.illegal.bad-ampersand.jsxAttributeValue.tsx",
3267
+ "match": "&"
3268
+ }
3269
+ ]
3270
+ },
3271
+ "jsx-evaluated-code": {
3272
+ "name": "meta.embedded.expression.tsx",
3273
+ "begin": "{",
3274
+ "end": "}",
3275
+ "beginCaptures": {
3276
+ "0": {
3277
+ "name": "punctuation.section.embedded.begin.tsx"
3278
+ }
3279
+ },
3280
+ "endCaptures": {
3281
+ "0": {
3282
+ "name": "punctuation.section.embedded.end.tsx"
3283
+ }
3284
+ },
3285
+ "patterns": [
3286
+ {
3287
+ "include": "#expression"
3288
+ }
3289
+ ]
3290
+ },
3291
+ "jsx-tag-attributes-illegal": {
3292
+ "name": "invalid.illegal.attribute.tsx",
3293
+ "match": "\\S+"
3294
+ },
3295
+ "jsx-tag-without-attributes": {
3296
+ "name": "meta.tag.without-attributes.tsx",
3297
+ "begin": "(<)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>)",
3298
+ "end": "(</)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>)",
3299
+ "beginCaptures": {
3300
+ "1": {
3301
+ "name": "punctuation.definition.tag.begin.tsx"
3302
+ },
3303
+ "2": {
3304
+ "name": "entity.name.tag.tsx"
3305
+ },
3306
+ "3": {
3307
+ "name": "punctuation.definition.tag.end.tsx"
3308
+ }
3309
+ },
3310
+ "endCaptures": {
3311
+ "1": {
3312
+ "name": "punctuation.definition.tag.begin.tsx"
3313
+ },
3314
+ "2": {
3315
+ "name": "entity.name.tag.tsx"
3316
+ },
3317
+ "3": {
3318
+ "name": "punctuation.definition.tag.end.tsx"
3319
+ }
3320
+ },
3321
+ "contentName": "meta.jsx.children.tsx",
3322
+ "patterns": [
3323
+ {
3324
+ "include": "#jsx-children"
3325
+ }
3326
+ ]
3327
+ },
3328
+ "jsx-tag-in-expression": {
3329
+ "begin": "(?x)\n (?<=[({\\[,?=>]|&&|\\|\\||\\?|\\Wreturn|^return|\\Wdefault|^)\\s*\n (?!(<)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>)) #look ahead is not start of tag without attributes\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
3330
+ "end": "(/>)|(?:(</)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>))",
3331
+ "endCaptures": {
3332
+ "0": {
3333
+ "name": "meta.tag.tsx"
3334
+ },
3335
+ "1": {
3336
+ "name": "punctuation.definition.tag.end.tsx"
3337
+ },
3338
+ "2": {
3339
+ "name": "punctuation.definition.tag.begin.tsx"
3340
+ },
3341
+ "3": {
3342
+ "name": "entity.name.tag.tsx"
3343
+ },
3344
+ "4": {
3345
+ "name": "punctuation.definition.tag.end.tsx"
3346
+ }
3347
+ },
3348
+ "patterns": [
3349
+ {
3350
+ "include": "#jsx-tag"
3351
+ }
3352
+ ]
3353
+ },
3354
+ "jsx-child-tag": {
3355
+ "begin": "(?x)\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
3356
+ "end": "(/>)|(?:(</)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>))",
3357
+ "endCaptures": {
3358
+ "0": {
3359
+ "name": "meta.tag.tsx"
3360
+ },
3361
+ "1": {
3362
+ "name": "punctuation.definition.tag.end.tsx"
3363
+ },
3364
+ "2": {
3365
+ "name": "punctuation.definition.tag.begin.tsx"
3366
+ },
3367
+ "3": {
3368
+ "name": "entity.name.tag.tsx"
3369
+ },
3370
+ "4": {
3371
+ "name": "punctuation.definition.tag.end.tsx"
3372
+ }
3373
+ },
3374
+ "patterns": [
3375
+ {
3376
+ "include": "#jsx-tag"
3377
+ }
3378
+ ]
3379
+ },
3380
+ "jsx-tag": {
3381
+ "name": "meta.tag.tsx",
3382
+ "begin": "(?x)\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
3383
+ "end": "(?=(/>)|(?:(</)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>)))",
3384
+ "patterns": [
3385
+ {
3386
+ "begin": "(?x)\n (<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>)",
3387
+ "beginCaptures": {
3388
+ "1": {
3389
+ "name": "punctuation.definition.tag.begin.tsx"
3390
+ },
3391
+ "2": {
3392
+ "name": "entity.name.tag.tsx"
3393
+ }
3394
+ },
3395
+ "end": "(?=[/]?>)",
3396
+ "patterns": [
3397
+ {
3398
+ "include": "#comment"
3399
+ },
3400
+ {
3401
+ "include": "#jsx-tag-attributes"
3402
+ },
3403
+ {
3404
+ "include": "#jsx-tag-attributes-illegal"
3405
+ }
3406
+ ]
3407
+ },
3408
+ {
3409
+ "begin": "(>)",
3410
+ "beginCaptures": {
3411
+ "1": {
3412
+ "name": "punctuation.definition.tag.end.tsx"
3413
+ }
3414
+ },
3415
+ "end": "(?=</)",
3416
+ "contentName": "meta.jsx.children.tsx",
3417
+ "patterns": [
3418
+ {
3419
+ "include": "#jsx-children"
3420
+ }
3421
+ ]
3422
+ }
3423
+ ]
3424
+ },
3425
+ "jsx-tag-invalid": {
3426
+ "name": "invalid.illegal.tag.incomplete.tsx",
3427
+ "match": "<\\s*>"
3428
+ },
3429
+ "jsx-children": {
3430
+ "patterns": [
3431
+ {
3432
+ "include": "#jsx-tag-without-attributes"
3433
+ },
3434
+ {
3435
+ "include": "#jsx-child-tag"
3436
+ },
3437
+ {
3438
+ "include": "#jsx-tag-invalid"
3439
+ },
3440
+ {
3441
+ "include": "#jsx-evaluated-code"
3442
+ },
3443
+ {
3444
+ "include": "#jsx-entities"
3445
+ }
3446
+ ]
3447
+ },
3448
+ "jsx": {
3449
+ "patterns": [
3450
+ {
3451
+ "include": "#jsx-tag-without-attributes"
3452
+ },
3453
+ {
3454
+ "include": "#jsx-tag-in-expression"
3455
+ },
3456
+ {
3457
+ "include": "#jsx-tag-invalid"
3458
+ }
3459
+ ]
3460
+ }
3461
+ }
1524
3462
  }