github-linguist 5.2.0 → 5.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/grammars/annotation.liquidhaskell.haskell.json +1445 -0
  3. data/grammars/hint.haskell.json +134 -17
  4. data/grammars/hint.message.haskell.json +134 -17
  5. data/grammars/hint.type.haskell.json +134 -17
  6. data/grammars/source.abl.json +48 -48
  7. data/grammars/source.afm.json +8 -1
  8. data/grammars/source.angelscript.json +195 -0
  9. data/grammars/source.ats.json +128 -58
  10. data/grammars/source.awk.json +138 -138
  11. data/grammars/source.ballerina.json +434 -0
  12. data/grammars/source.chapel.json +1 -1
  13. data/grammars/source.clips.json +20 -20
  14. data/grammars/source.cobol.json +4 -3
  15. data/grammars/source.coffee.json +556 -109
  16. data/grammars/source.cs.json +10 -5
  17. data/grammars/source.csound-document.json +1 -1
  18. data/grammars/source.csound-score.json +9 -9
  19. data/grammars/source.csound.json +23 -28
  20. data/grammars/source.css.json +6 -5
  21. data/grammars/source.data-weave.json +1584 -0
  22. data/grammars/source.elixir.json +3 -61
  23. data/grammars/source.elm.json +88 -88
  24. data/grammars/source.emacs.lisp.json +12 -1
  25. data/grammars/source.haskell.json +134 -17
  26. data/grammars/source.hsig.json +1376 -0
  27. data/grammars/source.httpspec.json +128 -128
  28. data/grammars/source.jison.json +6 -14
  29. data/grammars/source.jisonlex.json +1 -9
  30. data/grammars/source.js.json +1 -0
  31. data/grammars/source.js.regexp.json +0 -4
  32. data/grammars/source.js.regexp.replacement.json +0 -4
  33. data/grammars/source.jsdoc.json +3 -3
  34. data/grammars/source.lsl.json +146 -53
  35. data/grammars/source.mercury.json +166 -166
  36. data/grammars/source.ne.json +108 -0
  37. data/grammars/source.nim_filter.json +51 -51
  38. data/grammars/source.nut.json +266 -0
  39. data/grammars/source.opal.json +112 -112
  40. data/grammars/source.opalsysdefs.json +16 -16
  41. data/grammars/source.pan.json +1 -1
  42. data/grammars/source.papyrus.skyrim.json +720 -720
  43. data/grammars/source.pawn.json +2 -2
  44. data/grammars/source.prolog.eclipse.json +42 -42
  45. data/grammars/source.prolog.json +41 -41
  46. data/grammars/source.purescript.json +41 -25
  47. data/grammars/source.python.json +47 -34
  48. data/grammars/source.racket.json +54 -54
  49. data/grammars/source.reason.json +37 -3
  50. data/grammars/source.regexp.python.json +31 -0
  51. data/grammars/source.ruby.gemfile.json +27 -0
  52. data/grammars/source.ruby.json +1057 -356
  53. data/grammars/source.rust.json +1 -1
  54. data/grammars/source.sbt.json +13 -3
  55. data/grammars/source.scala.json +74 -55
  56. data/grammars/source.shaderlab.json +1 -1
  57. data/grammars/source.shell.json +26 -21
  58. data/grammars/source.shen.json +91 -91
  59. data/grammars/source.sqf.json +1 -1
  60. data/grammars/source.supercollider.json +1 -1
  61. data/grammars/source.swift.json +4 -0
  62. data/grammars/source.terra.json +36 -37
  63. data/grammars/source.terraform.json +98 -98
  64. data/grammars/source.ts.json +2231 -1677
  65. data/grammars/source.tsx.json +142 -3520
  66. data/grammars/source.vbnet.json +201 -263
  67. data/grammars/source.viml.json +2 -2
  68. data/grammars/source.wdl.json +200 -0
  69. data/grammars/source.yaml.json +34 -16
  70. data/grammars/text.find-refs.json +3 -3
  71. data/grammars/text.haml.json +1 -1
  72. data/grammars/text.html.abl.json +6 -6
  73. data/grammars/text.html.erb.json +8 -11
  74. data/grammars/text.html.php.blade.json +256 -220
  75. data/grammars/text.html.vue.json +1 -1
  76. data/grammars/text.slim.json +31 -17
  77. data/grammars/text.tex.latex.haskell.json +150 -33
  78. data/lib/linguist/heuristics.rb +8 -0
  79. data/lib/linguist/languages.json +1 -1
  80. data/lib/linguist/languages.yml +82 -26
  81. data/lib/linguist/samples.json +134512 -132868
  82. data/lib/linguist/vendor.yml +3 -0
  83. data/lib/linguist/version.rb +1 -1
  84. metadata +13 -4
@@ -5,3543 +5,47 @@
5
5
  "tsx"
6
6
  ],
7
7
  "uuid": "805375ec-d614-41f5-8993-5843fe63ea82",
8
- "patterns": [
9
- {
10
- "include": "#directives"
11
- },
12
- {
13
- "include": "#statements"
14
- },
15
- {
16
- "name": "comment.line.shebang.ts",
17
- "match": "\\A(#!).*(?=$)",
18
- "captures": {
19
- "1": {
20
- "name": "punctuation.definition.comment.ts"
21
- }
22
- }
23
- }
24
- ],
25
- "repository": {
26
- "statements": {
27
- "patterns": [
28
- {
29
- "include": "#string"
30
- },
31
- {
32
- "include": "#template"
33
- },
34
- {
35
- "include": "#comment"
36
- },
37
- {
38
- "include": "#declaration"
39
- },
40
- {
41
- "include": "#switch-statement"
42
- },
43
- {
44
- "include": "#for-loop"
45
- },
46
- {
47
- "include": "#after-operator-block"
48
- },
49
- {
50
- "include": "#decl-block"
51
- },
52
- {
53
- "include": "#control-statement"
54
- },
55
- {
56
- "include": "#expression"
57
- },
58
- {
59
- "include": "#punctuation-semicolon"
60
- }
61
- ]
62
- },
63
- "var-expr": {
64
- "name": "meta.var.expr.tsx",
65
- "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(var|let|const(?!\\s+enum\\b))\\b(?!\\$)",
66
- "beginCaptures": {
67
- "1": {
68
- "name": "keyword.control.export.tsx"
69
- },
70
- "2": {
71
- "name": "storage.type.tsx"
72
- }
73
- },
74
- "end": "(?=$|;|}|(\\s+(of|in)\\s+))",
75
- "patterns": [
76
- {
77
- "include": "#destructuring-variable"
78
- },
79
- {
80
- "include": "#var-single-variable"
81
- },
82
- {
83
- "include": "#variable-initializer"
84
- },
85
- {
86
- "include": "#comment"
87
- },
88
- {
89
- "include": "#punctuation-comma"
90
- }
91
- ]
92
- },
93
- "var-single-variable": {
94
- "patterns": [
95
- {
96
- "name": "meta.var-single-variable.expr.tsx",
97
- "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n (=\\s*(\n (async\\s+) |\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>) |\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>))\n ) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )))\n )\n)",
98
- "beginCaptures": {
99
- "1": {
100
- "name": "meta.definition.variable.tsx entity.name.function.tsx"
101
- }
102
- },
103
- "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
104
- "patterns": [
105
- {
106
- "include": "#var-single-variable-type-annotation"
107
- }
108
- ]
109
- },
110
- {
111
- "name": "meta.var-single-variable.expr.tsx",
112
- "begin": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
113
- "beginCaptures": {
114
- "1": {
115
- "name": "meta.definition.variable.tsx variable.other.constant.tsx"
116
- }
117
- },
118
- "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
119
- "patterns": [
120
- {
121
- "include": "#var-single-variable-type-annotation"
122
- }
123
- ]
124
- },
125
- {
126
- "name": "meta.var-single-variable.expr.tsx",
127
- "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
128
- "beginCaptures": {
129
- "1": {
130
- "name": "meta.definition.variable.tsx variable.other.readwrite.tsx"
131
- }
132
- },
133
- "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
134
- "patterns": [
135
- {
136
- "include": "#var-single-variable-type-annotation"
137
- }
138
- ]
139
- }
140
- ]
141
- },
142
- "var-single-variable-type-annotation": {
143
- "patterns": [
144
- {
145
- "include": "#type-annotation"
146
- },
147
- {
148
- "include": "#string"
149
- },
150
- {
151
- "include": "#comment"
152
- }
153
- ]
154
- },
155
- "destructuring-variable": {
156
- "patterns": [
157
- {
158
- "name": "meta.object-binding-pattern-variable.tsx",
159
- "begin": "(?<!=|:|of|in)\\s*(?=\\{)",
160
- "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
161
- "patterns": [
162
- {
163
- "include": "#object-binding-pattern"
164
- },
165
- {
166
- "include": "#type-annotation"
167
- },
168
- {
169
- "include": "#comment"
170
- }
171
- ]
172
- },
173
- {
174
- "name": "meta.array-binding-pattern-variable.tsx",
175
- "begin": "(?<!=|:|of|in)\\s*(?=\\[)",
176
- "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
177
- "patterns": [
178
- {
179
- "include": "#array-binding-pattern"
180
- },
181
- {
182
- "include": "#type-annotation"
183
- },
184
- {
185
- "include": "#comment"
186
- }
187
- ]
188
- }
189
- ]
190
- },
191
- "object-binding-element": {
192
- "patterns": [
193
- {
194
- "include": "#comment"
195
- },
196
- {
197
- "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
198
- "end": "(?=,|\\})",
199
- "patterns": [
200
- {
201
- "include": "#object-binding-element-propertyName"
202
- },
203
- {
204
- "include": "#binding-element"
205
- }
206
- ]
207
- },
208
- {
209
- "include": "#object-binding-pattern"
210
- },
211
- {
212
- "include": "#destructuring-variable-rest"
213
- },
214
- {
215
- "include": "#variable-initializer"
216
- },
217
- {
218
- "include": "#punctuation-comma"
219
- }
220
- ]
221
- },
222
- "object-binding-element-propertyName": {
223
- "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
224
- "end": "(:)",
225
- "endCaptures": {
226
- "0": {
227
- "name": "punctuation.destructuring.tsx"
228
- }
229
- },
230
- "patterns": [
231
- {
232
- "include": "#string"
233
- },
234
- {
235
- "include": "#array-literal"
236
- },
237
- {
238
- "name": "variable.object.property.tsx",
239
- "match": "([_$[:alpha:]][_$[:alnum:]]*)"
240
- }
241
- ]
242
- },
243
- "binding-element": {
244
- "patterns": [
245
- {
246
- "include": "#comment"
247
- },
248
- {
249
- "include": "#object-binding-pattern"
250
- },
251
- {
252
- "include": "#array-binding-pattern"
253
- },
254
- {
255
- "include": "#destructuring-variable-rest"
256
- },
257
- {
258
- "include": "#variable-initializer"
259
- }
260
- ]
261
- },
262
- "destructuring-variable-rest": {
263
- "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
264
- "captures": {
265
- "1": {
266
- "name": "keyword.operator.rest.tsx"
267
- },
268
- "2": {
269
- "name": "meta.definition.variable.tsx variable.other.readwrite.tsx"
270
- }
271
- }
272
- },
273
- "object-binding-pattern": {
274
- "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
275
- "beginCaptures": {
276
- "1": {
277
- "name": "keyword.operator.rest.tsx"
278
- },
279
- "2": {
280
- "name": "punctuation.definition.binding-pattern.object.tsx"
281
- }
282
- },
283
- "end": "\\}",
284
- "endCaptures": {
285
- "0": {
286
- "name": "punctuation.definition.binding-pattern.object.tsx"
287
- }
288
- },
289
- "patterns": [
290
- {
291
- "include": "#object-binding-element"
292
- }
293
- ]
294
- },
295
- "array-binding-pattern": {
296
- "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
297
- "beginCaptures": {
298
- "1": {
299
- "name": "keyword.operator.rest.tsx"
300
- },
301
- "2": {
302
- "name": "punctuation.definition.binding-pattern.array.tsx"
303
- }
304
- },
305
- "end": "\\]",
306
- "endCaptures": {
307
- "0": {
308
- "name": "punctuation.definition.binding-pattern.array.tsx"
309
- }
310
- },
311
- "patterns": [
312
- {
313
- "include": "#binding-element"
314
- },
315
- {
316
- "include": "#punctuation-comma"
317
- }
318
- ]
319
- },
320
- "ternary-expression": {
321
- "begin": "(\\?)",
322
- "beginCaptures": {
323
- "0": {
324
- "name": "keyword.operator.ternary.tsx"
325
- }
326
- },
327
- "end": "(:)",
328
- "endCaptures": {
329
- "0": {
330
- "name": "keyword.operator.ternary.tsx"
331
- }
332
- },
333
- "patterns": [
334
- {
335
- "include": "#expression"
336
- }
337
- ]
338
- },
339
- "expression": {
340
- "patterns": [
341
- {
342
- "include": "#jsx"
343
- },
344
- {
345
- "include": "#string"
346
- },
347
- {
348
- "include": "#regex"
349
- },
350
- {
351
- "include": "#template"
352
- },
353
- {
354
- "include": "#comment"
355
- },
356
- {
357
- "include": "#function-expression"
358
- },
359
- {
360
- "include": "#class-or-interface-declaration"
361
- },
362
- {
363
- "include": "#arrow-function"
364
- },
365
- {
366
- "include": "#cast"
367
- },
368
- {
369
- "include": "#ternary-expression"
370
- },
371
- {
372
- "include": "#new-expr"
373
- },
374
- {
375
- "include": "#object-literal"
376
- },
377
- {
378
- "include": "#expression-operators"
379
- },
380
- {
381
- "include": "#function-call"
382
- },
383
- {
384
- "include": "#literal"
385
- },
386
- {
387
- "include": "#support-objects"
388
- },
389
- {
390
- "include": "#identifiers"
391
- },
392
- {
393
- "include": "#paren-expression"
394
- },
395
- {
396
- "include": "#punctuation-comma"
397
- },
398
- {
399
- "include": "#punctuation-accessor"
400
- }
401
- ]
402
- },
403
- "control-statement": {
404
- "patterns": [
405
- {
406
- "name": "keyword.control.trycatch.tsx",
407
- "match": "(?<!\\.|\\$)\\b(catch|finally|throw|try)\\b(?!\\$)"
408
- },
409
- {
410
- "name": "keyword.control.loop.tsx",
411
- "match": "(?<!\\.|\\$)\\b(break|continue|do|goto|while)\\b(?!\\$)"
412
- },
413
- {
414
- "name": "keyword.control.flow.tsx",
415
- "match": "(?<!\\.|\\$)\\b(return)\\b(?!\\$)"
416
- },
417
- {
418
- "name": "keyword.control.switch.tsx",
419
- "match": "(?<!\\.|\\$)\\b(case|default|switch)\\b(?!\\$)"
420
- },
421
- {
422
- "name": "keyword.control.conditional.tsx",
423
- "match": "(?<!\\.|\\$)\\b(else|if)\\b(?!\\$)"
424
- },
425
- {
426
- "name": "keyword.control.with.tsx",
427
- "match": "(?<!\\.|\\$)\\b(with)\\b(?!\\$)"
428
- },
429
- {
430
- "name": "keyword.other.debugger.tsx",
431
- "match": "(?<!\\.|\\$)\\b(debugger)\\b(?!\\$)"
432
- },
433
- {
434
- "name": "storage.modifier.tsx",
435
- "match": "(?<!\\.|\\$)\\b(declare)\\b(?!\\$)"
436
- }
437
- ]
438
- },
439
- "declaration": {
440
- "patterns": [
441
- {
442
- "include": "#decorator"
443
- },
444
- {
445
- "include": "#var-expr"
446
- },
447
- {
448
- "include": "#function-declaration"
449
- },
450
- {
451
- "include": "#class-or-interface-declaration"
452
- },
453
- {
454
- "include": "#type-declaration"
455
- },
456
- {
457
- "include": "#enum-declaration"
458
- },
459
- {
460
- "include": "#namespace-declaration"
461
- },
462
- {
463
- "include": "#import-equals-declaration"
464
- },
465
- {
466
- "include": "#import-declaration"
467
- },
468
- {
469
- "include": "#export-declaration"
470
- }
471
- ]
472
- },
473
- "decorator": {
474
- "name": "meta.decorator.tsx",
475
- "begin": "(?<!\\.|\\$)\\@",
476
- "beginCaptures": {
477
- "0": {
478
- "name": "punctuation.decorator.tsx"
479
- }
480
- },
481
- "end": "(?=\\s)",
482
- "patterns": [
483
- {
484
- "include": "#expression"
485
- }
486
- ]
487
- },
488
- "type-declaration": {
489
- "name": "meta.type.declaration.tsx",
490
- "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*",
491
- "beginCaptures": {
492
- "1": {
493
- "name": "keyword.control.export.tsx"
494
- },
495
- "2": {
496
- "name": "storage.type.type.tsx"
497
- },
498
- "3": {
499
- "name": "entity.name.type.tsx"
500
- }
501
- },
502
- "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)",
503
- "patterns": [
504
- {
505
- "include": "#comment"
506
- },
507
- {
508
- "include": "#type-parameters"
509
- },
510
- {
511
- "include": "#type"
512
- },
513
- {
514
- "match": "(=)\\s*",
515
- "captures": {
516
- "1": {
517
- "name": "keyword.operator.assignment.tsx"
518
- }
519
- }
520
- }
521
- ]
522
- },
523
- "enum-declaration": {
524
- "name": "meta.enum.declaration.tsx",
525
- "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
526
- "beginCaptures": {
527
- "1": {
528
- "name": "keyword.control.export.tsx"
529
- },
530
- "2": {
531
- "name": "storage.modifier.tsx"
532
- },
533
- "3": {
534
- "name": "storage.type.enum.tsx"
535
- },
536
- "4": {
537
- "name": "entity.name.type.enum.tsx"
538
- }
539
- },
540
- "end": "(?<=\\})",
541
- "patterns": [
542
- {
543
- "include": "#comment"
544
- },
545
- {
546
- "begin": "\\{",
547
- "beginCaptures": {
548
- "0": {
549
- "name": "punctuation.definition.block.tsx"
550
- }
551
- },
552
- "end": "\\}",
553
- "endCaptures": {
554
- "0": {
555
- "name": "punctuation.definition.block.tsx"
556
- }
557
- },
558
- "patterns": [
559
- {
560
- "include": "#comment"
561
- },
562
- {
563
- "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
564
- "beginCaptures": {
565
- "0": {
566
- "name": "variable.other.enummember.tsx"
567
- }
568
- },
569
- "end": "(?=,|\\}|$)",
570
- "patterns": [
571
- {
572
- "include": "#comment"
573
- },
574
- {
575
- "include": "#variable-initializer"
576
- }
577
- ]
578
- },
579
- {
580
- "begin": "(?=((\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))",
581
- "end": "(?=,|\\}|$)",
582
- "patterns": [
583
- {
584
- "include": "#string"
585
- },
586
- {
587
- "include": "#array-literal"
588
- },
589
- {
590
- "include": "#comment"
591
- },
592
- {
593
- "include": "#variable-initializer"
594
- }
595
- ]
596
- },
597
- {
598
- "include": "#punctuation-comma"
599
- }
600
- ]
601
- }
602
- ]
603
- },
604
- "namespace-declaration": {
605
- "name": "meta.namespace.declaration.tsx",
606
- "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(namespace|module)\\s+(?=[_$[:alpha:]\"'`])",
607
- "beginCaptures": {
608
- "1": {
609
- "name": "keyword.control.export.tsx"
610
- },
611
- "2": {
612
- "name": "storage.type.namespace.tsx"
613
- }
614
- },
615
- "end": "(?=$|\\{)",
616
- "patterns": [
617
- {
618
- "include": "#comment"
619
- },
620
- {
621
- "include": "#string"
622
- },
623
- {
624
- "name": "entity.name.type.module.tsx",
625
- "match": "([_$[:alpha:]][_$[:alnum:]]*)"
626
- },
627
- {
628
- "include": "#punctuation-accessor"
629
- }
630
- ]
631
- },
632
- "import-equals-declaration": {
633
- "patterns": [
634
- {
635
- "name": "meta.import-equals.external.tsx",
636
- "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()",
637
- "beginCaptures": {
638
- "1": {
639
- "name": "keyword.control.export.tsx"
640
- },
641
- "2": {
642
- "name": "keyword.control.import.tsx"
643
- },
644
- "3": {
645
- "name": "variable.other.readwrite.alias.tsx"
646
- },
647
- "4": {
648
- "name": "keyword.operator.assignment.tsx"
649
- },
650
- "5": {
651
- "name": "keyword.control.require.tsx"
652
- },
653
- "6": {
654
- "name": "meta.brace.round.tsx"
655
- }
656
- },
657
- "end": "\\)",
658
- "endCaptures": {
659
- "0": {
660
- "name": "meta.brace.round.tsx"
661
- }
662
- },
663
- "patterns": [
664
- {
665
- "include": "#comment"
666
- },
667
- {
668
- "include": "#string"
669
- }
670
- ]
671
- },
672
- {
673
- "name": "meta.import-equals.internal.tsx",
674
- "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(?!require\\b)",
675
- "beginCaptures": {
676
- "1": {
677
- "name": "keyword.control.export.tsx"
678
- },
679
- "2": {
680
- "name": "keyword.control.import.tsx"
681
- },
682
- "3": {
683
- "name": "variable.other.readwrite.alias.tsx"
684
- },
685
- "4": {
686
- "name": "keyword.operator.assignment.tsx"
687
- }
688
- },
689
- "end": "(?=;|$)",
690
- "patterns": [
691
- {
692
- "include": "#comment"
693
- },
694
- {
695
- "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)",
696
- "captures": {
697
- "1": {
698
- "name": "entity.name.type.module.tsx"
699
- },
700
- "2": {
701
- "name": "punctuation.accessor.tsx"
702
- }
703
- }
704
- },
705
- {
706
- "name": "variable.other.readwrite.tsx",
707
- "match": "([_$[:alpha:]][_$[:alnum:]]*)"
708
- }
709
- ]
710
- }
711
- ]
712
- },
713
- "import-declaration": {
714
- "name": "meta.import.tsx",
715
- "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)(?!(\\s*:)|(\\$))\\b",
716
- "beginCaptures": {
717
- "1": {
718
- "name": "keyword.control.export.tsx"
719
- },
720
- "2": {
721
- "name": "keyword.control.import.tsx"
722
- }
723
- },
724
- "end": "(?=;|$)",
725
- "patterns": [
726
- {
727
- "include": "#import-export-declaration"
728
- }
729
- ]
730
- },
731
- "export-declaration": {
732
- "patterns": [
733
- {
734
- "match": "(?<!\\.|\\$)\\b(export)\\s+(as)\\s+(namespace)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
735
- "captures": {
736
- "1": {
737
- "name": "keyword.control.export.tsx"
738
- },
739
- "2": {
740
- "name": "keyword.control.as.tsx"
741
- },
742
- "3": {
743
- "name": "storage.type.namespace.tsx"
744
- },
745
- "4": {
746
- "name": "entity.name.type.module.tsx"
747
- }
748
- }
749
- },
750
- {
751
- "name": "meta.export.default.tsx",
752
- "begin": "(?<!\\.|\\$)\\b(export)(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))",
753
- "beginCaptures": {
754
- "1": {
755
- "name": "keyword.control.export.tsx"
756
- },
757
- "2": {
758
- "name": "keyword.operator.assignment.tsx"
759
- },
760
- "3": {
761
- "name": "keyword.control.default.tsx"
762
- }
763
- },
764
- "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|$)",
765
- "patterns": [
766
- {
767
- "include": "#expression"
768
- }
769
- ]
770
- },
771
- {
772
- "name": "meta.export.tsx",
773
- "begin": "(?<!\\.|\\$)\\b(export)(?!(\\s*:)|(\\$))\\b",
774
- "beginCaptures": {
775
- "0": {
776
- "name": "keyword.control.export.tsx"
777
- }
778
- },
779
- "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|$)",
780
- "patterns": [
781
- {
782
- "include": "#import-export-declaration"
783
- }
784
- ]
785
- }
786
- ]
787
- },
788
- "import-export-declaration": {
789
- "patterns": [
790
- {
791
- "include": "#comment"
792
- },
793
- {
794
- "include": "#string"
795
- },
796
- {
797
- "include": "#import-export-block"
798
- },
799
- {
800
- "name": "keyword.control.from.tsx",
801
- "match": "\\bfrom\\b"
802
- },
803
- {
804
- "include": "#import-export-clause"
805
- }
806
- ]
807
- },
808
- "import-export-block": {
809
- "name": "meta.block.tsx",
810
- "begin": "\\{",
811
- "beginCaptures": {
812
- "0": {
813
- "name": "punctuation.definition.block.tsx"
814
- }
815
- },
816
- "end": "\\}",
817
- "endCaptures": {
818
- "0": {
819
- "name": "punctuation.definition.block.tsx"
820
- }
821
- },
822
- "patterns": [
823
- {
824
- "include": "#import-export-clause"
825
- }
826
- ]
827
- },
828
- "import-export-clause": {
829
- "patterns": [
830
- {
831
- "include": "#comment"
832
- },
833
- {
834
- "comment": "(default|*|name) as alias",
835
- "match": "(?x) (?: \\b(default)\\b | (\\*) | ([_$[:alpha:]][_$[:alnum:]]*)) \\s+ \n (as) \\s+ (?: (\\b default \\b | \\*) | ([_$[:alpha:]][_$[:alnum:]]*))",
836
- "captures": {
837
- "1": {
838
- "name": "keyword.control.default.tsx"
839
- },
840
- "2": {
841
- "name": "constant.language.import-export-all.tsx"
842
- },
843
- "3": {
844
- "name": "variable.other.readwrite.tsx"
845
- },
846
- "4": {
847
- "name": "keyword.control.as.tsx"
848
- },
849
- "5": {
850
- "name": "invalid.illegal.tsx"
851
- },
852
- "6": {
853
- "name": "variable.other.readwrite.alias.tsx"
854
- }
855
- }
856
- },
857
- {
858
- "include": "#punctuation-comma"
859
- },
860
- {
861
- "name": "constant.language.import-export-all.tsx",
862
- "match": "\\*"
863
- },
864
- {
865
- "name": "keyword.control.default.tsx",
866
- "match": "\\b(default)\\b"
867
- },
868
- {
869
- "name": "variable.other.readwrite.alias.tsx",
870
- "match": "([_$[:alpha:]][_$[:alnum:]]*)"
871
- }
872
- ]
873
- },
874
- "class-or-interface-declaration": {
875
- "name": "meta.class.tsx",
876
- "begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(?:(class)|(interface))\\b(?=\\s+|/[/*])",
877
- "beginCaptures": {
878
- "1": {
879
- "name": "keyword.control.export.tsx"
880
- },
881
- "2": {
882
- "name": "storage.modifier.tsx"
883
- },
884
- "3": {
885
- "name": "storage.type.class.tsx"
886
- },
887
- "4": {
888
- "name": "storage.type.interface.tsx"
889
- }
890
- },
891
- "end": "(?<=\\})",
892
- "endCaptures": {
893
- "1": {
894
- "name": "punctuation.definition.block.tsx"
895
- }
896
- },
897
- "patterns": [
898
- {
899
- "include": "#comment"
900
- },
901
- {
902
- "include": "#class-or-interface-heritage"
903
- },
904
- {
905
- "match": "[_$[:alpha:]][_$[:alnum:]]*",
906
- "captures": {
907
- "0": {
908
- "name": "entity.name.type.class.tsx"
909
- }
910
- }
911
- },
912
- {
913
- "include": "#type-parameters"
914
- },
915
- {
916
- "include": "#class-or-interface-body"
917
- }
918
- ]
919
- },
920
- "class-or-interface-heritage": {
921
- "begin": "(?<!\\.|\\$)(?:\\b(extends|implements)\\b)(?!\\$)",
922
- "beginCaptures": {
923
- "1": {
924
- "name": "storage.modifier.tsx"
925
- }
926
- },
927
- "end": "(?=\\{)",
928
- "endCaptures": {
929
- "1": {
930
- "name": "punctuation.definition.block.tsx"
931
- }
932
- },
933
- "patterns": [
934
- {
935
- "include": "#comment"
936
- },
937
- {
938
- "include": "#class-or-interface-heritage"
939
- },
940
- {
941
- "include": "#type-parameters"
942
- },
943
- {
944
- "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)(?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)*\\s*([,<{]|extends|implements|//|/\\*))",
945
- "captures": {
946
- "1": {
947
- "name": "entity.name.type.module.tsx"
948
- },
949
- "2": {
950
- "name": "punctuation.accessor.tsx"
951
- }
952
- }
953
- },
954
- {
955
- "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*([,<{]|extends|implements|//|/\\*))",
956
- "captures": {
957
- "1": {
958
- "name": "entity.other.inherited-class.tsx"
959
- }
960
- }
961
- },
962
- {
963
- "include": "#expression"
964
- }
965
- ]
966
- },
967
- "class-or-interface-body": {
968
- "begin": "\\{",
969
- "beginCaptures": {
970
- "0": {
971
- "name": "punctuation.definition.block.tsx"
972
- }
973
- },
974
- "end": "\\}",
975
- "endCaptures": {
976
- "0": {
977
- "name": "punctuation.definition.block.tsx"
978
- }
979
- },
980
- "patterns": [
981
- {
982
- "include": "#string"
983
- },
984
- {
985
- "include": "#comment"
986
- },
987
- {
988
- "include": "#decorator"
989
- },
990
- {
991
- "include": "#method-declaration"
992
- },
993
- {
994
- "include": "#indexer-declaration"
995
- },
996
- {
997
- "include": "#field-declaration"
998
- },
999
- {
1000
- "include": "#type-annotation"
1001
- },
1002
- {
1003
- "include": "#variable-initializer"
1004
- },
1005
- {
1006
- "include": "#access-modifier"
1007
- },
1008
- {
1009
- "include": "#property-accessor"
1010
- },
1011
- {
1012
- "include": "#after-operator-block"
1013
- },
1014
- {
1015
- "include": "#decl-block"
1016
- },
1017
- {
1018
- "include": "#expression"
1019
- },
1020
- {
1021
- "include": "#punctuation-comma"
1022
- },
1023
- {
1024
- "include": "#punctuation-semicolon"
1025
- }
1026
- ]
1027
- },
1028
- "type-object": {
1029
- "name": "meta.object.type.tsx",
1030
- "begin": "\\{",
1031
- "beginCaptures": {
1032
- "0": {
1033
- "name": "punctuation.definition.block.tsx"
1034
- }
1035
- },
1036
- "end": "\\}",
1037
- "endCaptures": {
1038
- "0": {
1039
- "name": "punctuation.definition.block.tsx"
1040
- }
1041
- },
1042
- "patterns": [
1043
- {
1044
- "include": "#type-object-members"
1045
- }
1046
- ]
1047
- },
1048
- "type-object-members": {
1049
- "patterns": [
1050
- {
1051
- "include": "#comment"
1052
- },
1053
- {
1054
- "include": "#method-declaration"
1055
- },
1056
- {
1057
- "include": "#indexer-declaration"
1058
- },
1059
- {
1060
- "include": "#indexer-mapped-type-declaration"
1061
- },
1062
- {
1063
- "include": "#field-declaration"
1064
- },
1065
- {
1066
- "include": "#type-annotation"
1067
- },
1068
- {
1069
- "begin": "\\.\\.\\.",
1070
- "beginCaptures": {
1071
- "0": {
1072
- "name": "keyword.operator.spread.tsx"
1073
- }
1074
- },
1075
- "end": "(?=\\}|;|,|$)|(?<=\\})",
1076
- "patterns": [
1077
- {
1078
- "include": "#type"
1079
- }
1080
- ]
1081
- },
1082
- {
1083
- "include": "#punctuation-comma"
1084
- },
1085
- {
1086
- "include": "#punctuation-semicolon"
1087
- },
1088
- {
1089
- "include": "#type"
1090
- }
1091
- ]
1092
- },
1093
- "field-declaration": {
1094
- "name": "meta.field.declaration.tsx",
1095
- "begin": "(?<!\\()(?:(?<!\\.|\\$)\\b(readonly)\\s+)?(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
1096
- "beginCaptures": {
1097
- "1": {
1098
- "name": "storage.modifier.tsx"
1099
- }
1100
- },
1101
- "end": "(?=\\}|;|,|$)|(?<=\\})",
1102
- "patterns": [
1103
- {
1104
- "include": "#variable-initializer"
1105
- },
1106
- {
1107
- "begin": "(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
1108
- "end": "(?=[};,=]|$)|(?<=\\})",
1109
- "patterns": [
1110
- {
1111
- "include": "#type-annotation"
1112
- },
1113
- {
1114
- "include": "#string"
1115
- },
1116
- {
1117
- "include": "#array-literal"
1118
- },
1119
- {
1120
- "include": "#comment"
1121
- },
1122
- {
1123
- "name": "meta.definition.property.tsx entity.name.function.tsx",
1124
- "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n (=\\s*(\n (async\\s+) |\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>) |\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>))\n ) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )))\n )\n)"
1125
- },
1126
- {
1127
- "name": "meta.definition.property.tsx variable.object.property.tsx",
1128
- "match": "[_$[:alpha:]][_$[:alnum:]]*"
1129
- },
1130
- {
1131
- "name": "keyword.operator.optional.tsx",
1132
- "match": "\\?"
1133
- }
1134
- ]
1135
- }
1136
- ]
1137
- },
1138
- "method-declaration": {
1139
- "name": "meta.method.declaration.tsx",
1140
- "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*[\\(\\<]))",
1141
- "beginCaptures": {
1142
- "1": {
1143
- "name": "storage.modifier.tsx"
1144
- },
1145
- "2": {
1146
- "name": "storage.modifier.tsx"
1147
- },
1148
- "3": {
1149
- "name": "storage.modifier.async.tsx"
1150
- },
1151
- "4": {
1152
- "name": "storage.type.property.tsx"
1153
- },
1154
- "5": {
1155
- "name": "keyword.operator.new.tsx"
1156
- },
1157
- "6": {
1158
- "name": "storage.type.tsx"
1159
- },
1160
- "7": {
1161
- "name": "keyword.generator.asterisk.tsx"
1162
- }
1163
- },
1164
- "end": "(?=\\}|;|,|$)|(?<=\\})",
1165
- "patterns": [
1166
- {
1167
- "include": "#method-declaration-name"
1168
- },
1169
- {
1170
- "include": "#comment"
1171
- },
1172
- {
1173
- "include": "#type-parameters"
1174
- },
1175
- {
1176
- "include": "#function-parameters"
1177
- },
1178
- {
1179
- "include": "#return-type"
1180
- },
1181
- {
1182
- "include": "#decl-block"
1183
- }
1184
- ]
1185
- },
1186
- "method-declaration-name": {
1187
- "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\<])",
1188
- "end": "(?=\\(|\\<)",
1189
- "patterns": [
1190
- {
1191
- "include": "#string"
1192
- },
1193
- {
1194
- "include": "#array-literal"
1195
- },
1196
- {
1197
- "name": "meta.definition.method.tsx entity.name.function.tsx",
1198
- "match": "[_$[:alpha:]][_$[:alnum:]]*"
1199
- },
1200
- {
1201
- "name": "keyword.operator.optional.tsx",
1202
- "match": "\\?"
1203
- }
1204
- ]
1205
- },
1206
- "object-literal-method-declaration": {
1207
- "name": "meta.method.declaration.tsx",
1208
- "begin": "(?<!\\.|\\$)(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))?\\s*[\\(\\<])",
1209
- "beginCaptures": {
1210
- "1": {
1211
- "name": "storage.modifier.async.tsx"
1212
- },
1213
- "2": {
1214
- "name": "storage.type.property.tsx"
1215
- },
1216
- "3": {
1217
- "name": "keyword.generator.asterisk.tsx"
1218
- }
1219
- },
1220
- "end": "(?=\\}|;|,)|(?<=\\})",
1221
- "patterns": [
1222
- {
1223
- "include": "#method-declaration-name"
1224
- },
1225
- {
1226
- "include": "#comment"
1227
- },
1228
- {
1229
- "include": "#type-parameters"
1230
- },
1231
- {
1232
- "include": "#function-parameters"
1233
- },
1234
- {
1235
- "include": "#return-type"
1236
- },
1237
- {
1238
- "include": "#object-literal-method-overload-declaration"
1239
- },
1240
- {
1241
- "include": "#decl-block"
1242
- }
1243
- ]
1244
- },
1245
- "object-literal-method-overload-declaration": {
1246
- "begin": "(?<!\\.|\\$)(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))?\\s*[\\(\\<])",
1247
- "beginCaptures": {
1248
- "1": {
1249
- "name": "storage.modifier.async.tsx"
1250
- },
1251
- "2": {
1252
- "name": "storage.type.property.tsx"
1253
- },
1254
- "3": {
1255
- "name": "keyword.generator.asterisk.tsx"
1256
- }
1257
- },
1258
- "end": "(?=\\(|\\<)",
1259
- "patterns": [
1260
- {
1261
- "include": "#method-declaration-name"
1262
- }
1263
- ]
1264
- },
1265
- "indexer-declaration": {
1266
- "name": "meta.indexer.declaration.tsx",
1267
- "begin": "(?:(?<!\\.|\\$)\\b(readonly)\\s*)?(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)",
1268
- "beginCaptures": {
1269
- "1": {
1270
- "name": "storage.modifier.tsx"
1271
- },
1272
- "2": {
1273
- "name": "meta.brace.square.tsx"
1274
- },
1275
- "3": {
1276
- "name": "variable.parameter.tsx"
1277
- }
1278
- },
1279
- "end": "(\\])\\s*(\\?\\s*)?|$",
1280
- "endCaptures": {
1281
- "1": {
1282
- "name": "meta.brace.square.tsx"
1283
- },
1284
- "2": {
1285
- "name": "keyword.operator.optional.tsx"
1286
- }
1287
- },
1288
- "patterns": [
1289
- {
1290
- "include": "#type-annotation"
1291
- }
1292
- ]
1293
- },
1294
- "indexer-mapped-type-declaration": {
1295
- "name": "meta.indexer.mappedtype.declaration.tsx",
1296
- "begin": "(?:(?<!\\.|\\$)\\b(readonly)\\s*)?(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s+(in)\\s+",
1297
- "beginCaptures": {
1298
- "1": {
1299
- "name": "storage.modifier.tsx"
1300
- },
1301
- "2": {
1302
- "name": "meta.brace.square.tsx"
1303
- },
1304
- "3": {
1305
- "name": "entity.name.type.tsx"
1306
- },
1307
- "4": {
1308
- "name": "keyword.operator.expression.in.tsx"
1309
- }
1310
- },
1311
- "end": "(\\])\\s*(\\?\\s*)?|$",
1312
- "endCaptures": {
1313
- "1": {
1314
- "name": "meta.brace.square.tsx"
1315
- },
1316
- "2": {
1317
- "name": "keyword.operator.optional.tsx"
1318
- }
1319
- },
1320
- "patterns": [
1321
- {
1322
- "include": "#type"
1323
- }
1324
- ]
1325
- },
1326
- "function-declaration": {
1327
- "name": "meta.function.tsx",
1328
- "begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
1329
- "beginCaptures": {
1330
- "1": {
1331
- "name": "keyword.control.export.tsx"
1332
- },
1333
- "2": {
1334
- "name": "storage.modifier.async.tsx"
1335
- },
1336
- "3": {
1337
- "name": "storage.type.function.tsx"
1338
- },
1339
- "4": {
1340
- "name": "keyword.generator.asterisk.tsx"
1341
- },
1342
- "5": {
1343
- "name": "meta.definition.function.tsx entity.name.function.tsx"
1344
- }
1345
- },
1346
- "end": "(?=$|;)|(?<=\\})",
1347
- "patterns": [
1348
- {
1349
- "include": "#comment"
1350
- },
1351
- {
1352
- "include": "#type-parameters"
1353
- },
1354
- {
1355
- "include": "#function-parameters"
1356
- },
1357
- {
1358
- "include": "#return-type"
1359
- },
1360
- {
1361
- "include": "#decl-block"
1362
- }
1363
- ]
1364
- },
1365
- "function-expression": {
1366
- "name": "meta.function.expression.tsx",
1367
- "begin": "(?<!\\.|\\$)\\b(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
1368
- "beginCaptures": {
1369
- "1": {
1370
- "name": "storage.modifier.async.tsx"
1371
- },
1372
- "2": {
1373
- "name": "storage.type.function.tsx"
1374
- },
1375
- "3": {
1376
- "name": "keyword.generator.asterisk.tsx"
1377
- },
1378
- "4": {
1379
- "name": "meta.definition.function.tsx entity.name.function.tsx"
1380
- }
1381
- },
1382
- "end": "(?<=\\})",
1383
- "patterns": [
1384
- {
1385
- "include": "#comment"
1386
- },
1387
- {
1388
- "include": "#type-parameters"
1389
- },
1390
- {
1391
- "include": "#function-parameters"
1392
- },
1393
- {
1394
- "include": "#return-type"
1395
- },
1396
- {
1397
- "include": "#decl-block"
1398
- }
1399
- ]
1400
- },
1401
- "object-literal": {
1402
- "name": "meta.objectliteral.tsx",
1403
- "begin": "\\{",
1404
- "beginCaptures": {
1405
- "0": {
1406
- "name": "punctuation.definition.block.tsx"
1407
- }
1408
- },
1409
- "end": "\\}",
1410
- "endCaptures": {
1411
- "0": {
1412
- "name": "punctuation.definition.block.tsx"
1413
- }
1414
- },
1415
- "patterns": [
1416
- {
1417
- "include": "#object-member"
1418
- }
1419
- ]
1420
- },
1421
- "decl-block": {
1422
- "name": "meta.block.tsx",
1423
- "begin": "\\{",
1424
- "beginCaptures": {
1425
- "0": {
1426
- "name": "punctuation.definition.block.tsx"
1427
- }
1428
- },
1429
- "end": "\\}",
1430
- "endCaptures": {
1431
- "0": {
1432
- "name": "punctuation.definition.block.tsx"
1433
- }
1434
- },
1435
- "patterns": [
1436
- {
1437
- "include": "#statements"
1438
- }
1439
- ]
1440
- },
1441
- "after-operator-block": {
1442
- "name": "meta.objectliteral.tsx",
1443
- "begin": "(?<=[=(,\\[?+!]|await|return|yield|throw|in|of|typeof|&&|\\|\\||\\*)\\s*(\\{)",
1444
- "beginCaptures": {
1445
- "1": {
1446
- "name": "punctuation.definition.block.tsx"
1447
- }
1448
- },
1449
- "end": "\\}",
1450
- "endCaptures": {
1451
- "0": {
1452
- "name": "punctuation.definition.block.tsx"
1453
- }
1454
- },
1455
- "patterns": [
1456
- {
1457
- "include": "#object-member"
1458
- }
1459
- ]
1460
- },
1461
- "parameter-name": {
1462
- "patterns": [
1463
- {
1464
- "match": "\\s*\\b(public|protected|private|readonly)(?=\\s+(public|protected|private|readonly)\\s+)",
1465
- "captures": {
1466
- "1": {
1467
- "name": "storage.modifier.tsx"
1468
- }
1469
- }
1470
- },
1471
- {
1472
- "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\??)(?=\\s*\n (=\\s*(\n (async\\s+) |\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>) |\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>))\n ) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )))\n )\n)",
1473
- "captures": {
1474
- "1": {
1475
- "name": "storage.modifier.tsx"
1476
- },
1477
- "2": {
1478
- "name": "keyword.operator.rest.tsx"
1479
- },
1480
- "3": {
1481
- "name": "entity.name.function.tsx"
1482
- },
1483
- "4": {
1484
- "name": "keyword.operator.optional.tsx"
1485
- }
1486
- }
1487
- },
1488
- {
1489
- "match": "(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\??)",
1490
- "captures": {
1491
- "1": {
1492
- "name": "storage.modifier.tsx"
1493
- },
1494
- "2": {
1495
- "name": "keyword.operator.rest.tsx"
1496
- },
1497
- "3": {
1498
- "name": "variable.parameter.tsx"
1499
- },
1500
- "4": {
1501
- "name": "keyword.operator.optional.tsx"
1502
- }
1503
- }
1504
- }
1505
- ]
1506
- },
1507
- "destructuring-parameter": {
1508
- "patterns": [
1509
- {
1510
- "name": "meta.parameter.object-binding-pattern.tsx",
1511
- "begin": "(?<!=|:)\\s*(\\{)",
1512
- "beginCaptures": {
1513
- "1": {
1514
- "name": "punctuation.definition.binding-pattern.object.tsx"
1515
- }
1516
- },
1517
- "end": "\\}",
1518
- "endCaptures": {
1519
- "0": {
1520
- "name": "punctuation.definition.binding-pattern.object.tsx"
1521
- }
1522
- },
1523
- "patterns": [
1524
- {
1525
- "include": "#parameter-object-binding-element"
1526
- }
1527
- ]
1528
- },
1529
- {
1530
- "name": "meta.paramter.array-binding-pattern.tsx",
1531
- "begin": "(?<!=|:)\\s*(\\[)",
1532
- "beginCaptures": {
1533
- "1": {
1534
- "name": "punctuation.definition.binding-pattern.array.tsx"
1535
- }
1536
- },
1537
- "end": "\\]",
1538
- "endCaptures": {
1539
- "0": {
1540
- "name": "punctuation.definition.binding-pattern.array.tsx"
1541
- }
1542
- },
1543
- "patterns": [
1544
- {
1545
- "include": "#parameter-binding-element"
1546
- },
1547
- {
1548
- "include": "#punctuation-comma"
1549
- }
1550
- ]
1551
- }
1552
- ]
1553
- },
1554
- "parameter-object-binding-element": {
1555
- "patterns": [
1556
- {
1557
- "include": "#comment"
1558
- },
1559
- {
1560
- "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
1561
- "end": "(?=,|\\})",
1562
- "patterns": [
1563
- {
1564
- "include": "#object-binding-element-propertyName"
1565
- },
1566
- {
1567
- "include": "#parameter-binding-element"
1568
- }
1569
- ]
1570
- },
1571
- {
1572
- "include": "#parameter-object-binding-pattern"
1573
- },
1574
- {
1575
- "include": "#destructuring-parameter-rest"
1576
- },
1577
- {
1578
- "include": "#variable-initializer"
1579
- },
1580
- {
1581
- "include": "#punctuation-comma"
1582
- }
1583
- ]
1584
- },
1585
- "parameter-binding-element": {
1586
- "patterns": [
1587
- {
1588
- "include": "#comment"
1589
- },
1590
- {
1591
- "include": "#parameter-object-binding-pattern"
1592
- },
1593
- {
1594
- "include": "#parameter-array-binding-pattern"
1595
- },
1596
- {
1597
- "include": "#destructuring-parameter-rest"
1598
- },
1599
- {
1600
- "include": "#variable-initializer"
1601
- }
1602
- ]
1603
- },
1604
- "destructuring-parameter-rest": {
1605
- "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
1606
- "captures": {
1607
- "1": {
1608
- "name": "keyword.operator.rest.tsx"
1609
- },
1610
- "2": {
1611
- "name": "variable.parameter.tsx"
1612
- }
1613
- }
1614
- },
1615
- "parameter-object-binding-pattern": {
1616
- "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
1617
- "beginCaptures": {
1618
- "1": {
1619
- "name": "keyword.operator.rest.tsx"
1620
- },
1621
- "2": {
1622
- "name": "punctuation.definition.binding-pattern.object.tsx"
1623
- }
1624
- },
1625
- "end": "\\}",
1626
- "endCaptures": {
1627
- "0": {
1628
- "name": "punctuation.definition.binding-pattern.object.tsx"
1629
- }
1630
- },
1631
- "patterns": [
1632
- {
1633
- "include": "#parameter-object-binding-element"
1634
- }
1635
- ]
1636
- },
1637
- "parameter-array-binding-pattern": {
1638
- "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
1639
- "beginCaptures": {
1640
- "1": {
1641
- "name": "keyword.operator.rest.tsx"
1642
- },
1643
- "2": {
1644
- "name": "punctuation.definition.binding-pattern.array.tsx"
1645
- }
1646
- },
1647
- "end": "\\]",
1648
- "endCaptures": {
1649
- "0": {
1650
- "name": "punctuation.definition.binding-pattern.array.tsx"
1651
- }
1652
- },
1653
- "patterns": [
1654
- {
1655
- "include": "#parameter-binding-element"
1656
- },
1657
- {
1658
- "include": "#punctuation-comma"
1659
- }
1660
- ]
1661
- },
1662
- "return-type": {
1663
- "name": "meta.return.type.tsx",
1664
- "begin": "(?<=\\))\\s*(:)",
1665
- "beginCaptures": {
1666
- "1": {
1667
- "name": "keyword.operator.type.annotation.tsx"
1668
- }
1669
- },
1670
- "end": "(?<!:)((?=$)|(?=[{};,]|//))",
1671
- "patterns": [
1672
- {
1673
- "include": "#comment"
1674
- },
1675
- {
1676
- "name": "meta.object.type.tsx",
1677
- "begin": "(?<=:)\\s*(\\{)",
1678
- "beginCaptures": {
1679
- "1": {
1680
- "name": "punctuation.definition.block.tsx"
1681
- }
1682
- },
1683
- "end": "\\}",
1684
- "endCaptures": {
1685
- "0": {
1686
- "name": "punctuation.definition.block.tsx"
1687
- }
1688
- },
1689
- "patterns": [
1690
- {
1691
- "include": "#type-object-members"
1692
- }
1693
- ]
1694
- },
1695
- {
1696
- "include": "#type-predicate-operator"
1697
- },
1698
- {
1699
- "include": "#type"
1700
- }
1701
- ]
1702
- },
1703
- "type-predicate-operator": {
1704
- "name": "keyword.operator.expression.is.tsx",
1705
- "match": "(?<!\\.|\\$)\\bis\\b(?!\\$)"
1706
- },
1707
- "type-annotation": {
1708
- "name": "meta.type.annotation.tsx",
1709
- "begin": ":",
1710
- "beginCaptures": {
1711
- "0": {
1712
- "name": "keyword.operator.type.annotation.tsx"
1713
- }
1714
- },
1715
- "end": "(?=$|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)",
1716
- "patterns": [
1717
- {
1718
- "include": "#comment"
1719
- },
1720
- {
1721
- "include": "#type"
1722
- }
1723
- ]
1724
- },
1725
- "type": {
1726
- "patterns": [
1727
- {
1728
- "include": "#comment"
1729
- },
1730
- {
1731
- "include": "#string"
1732
- },
1733
- {
1734
- "include": "#numeric-literal"
1735
- },
1736
- {
1737
- "include": "#type-primitive"
1738
- },
1739
- {
1740
- "include": "#type-builtin-literals"
1741
- },
1742
- {
1743
- "include": "#type-parameters"
1744
- },
1745
- {
1746
- "include": "#type-tuple"
1747
- },
1748
- {
1749
- "include": "#type-object"
1750
- },
1751
- {
1752
- "include": "#type-operators"
1753
- },
1754
- {
1755
- "include": "#type-fn-type-parameters"
1756
- },
1757
- {
1758
- "include": "#type-paren-or-function-parameters"
1759
- },
1760
- {
1761
- "include": "#type-function-return-type"
1762
- },
1763
- {
1764
- "include": "#type-name"
1765
- }
1766
- ]
1767
- },
1768
- "function-parameters": {
1769
- "name": "meta.parameters.tsx",
1770
- "begin": "\\(",
1771
- "beginCaptures": {
1772
- "0": {
1773
- "name": "punctuation.definition.parameters.begin.tsx"
1774
- }
1775
- },
1776
- "end": "\\)",
1777
- "endCaptures": {
1778
- "0": {
1779
- "name": "punctuation.definition.parameters.end.tsx"
1780
- }
1781
- },
1782
- "patterns": [
1783
- {
1784
- "include": "#comment"
1785
- },
1786
- {
1787
- "include": "#decorator"
1788
- },
1789
- {
1790
- "include": "#destructuring-parameter"
1791
- },
1792
- {
1793
- "include": "#parameter-name"
1794
- },
1795
- {
1796
- "include": "#type-annotation"
1797
- },
1798
- {
1799
- "include": "#variable-initializer"
1800
- },
1801
- {
1802
- "name": "punctuation.separator.parameter.tsx",
1803
- "match": ","
1804
- }
1805
- ]
1806
- },
1807
- "type-primitive": {
1808
- "name": "support.type.primitive.tsx",
1809
- "match": "(?<!\\.|\\$)\\b(string|number|boolean|symbol|any|void|never)\\b(?!\\$)"
1810
- },
1811
- "type-builtin-literals": {
1812
- "name": "support.type.builtin.tsx",
1813
- "match": "(?<!\\.|\\$)\\b(this|true|false|undefined|null|object)\\b(?!\\$)"
1814
- },
1815
- "type-paren-or-function-parameters": {
1816
- "name": "meta.type.paren.cover.tsx",
1817
- "begin": "\\(",
1818
- "beginCaptures": {
1819
- "0": {
1820
- "name": "meta.brace.round.tsx"
1821
- }
1822
- },
1823
- "end": "\\)",
1824
- "endCaptures": {
1825
- "0": {
1826
- "name": "meta.brace.round.tsx"
1827
- }
1828
- },
1829
- "patterns": [
1830
- {
1831
- "include": "#type"
1832
- },
1833
- {
1834
- "include": "#function-parameters"
1835
- }
1836
- ]
1837
- },
1838
- "type-fn-type-parameters": {
1839
- "patterns": [
1840
- {
1841
- "name": "meta.type.constructor.tsx",
1842
- "match": "(?<!\\.|\\$)\\b(new)\\b(?=\\s*\\<)",
1843
- "captures": {
1844
- "1": {
1845
- "name": "keyword.control.new.tsx"
1846
- }
1847
- }
1848
- },
1849
- {
1850
- "name": "meta.type.constructor.tsx",
1851
- "begin": "(?<!\\.|\\$)\\b(new)\\b\\s*(?=\\()",
1852
- "beginCaptures": {
1853
- "1": {
1854
- "name": "keyword.control.new.tsx"
1855
- }
1856
- },
1857
- "end": "(?<=\\))",
1858
- "patterns": [
1859
- {
1860
- "include": "#function-parameters"
1861
- }
1862
- ]
1863
- },
1864
- {
1865
- "name": "meta.type.function.tsx",
1866
- "begin": "(?x)(\n (?=\n [(]\\s*(\n ([)]) | \n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )\n )\n)",
1867
- "end": "(?<=\\))",
1868
- "patterns": [
1869
- {
1870
- "include": "#function-parameters"
1871
- }
1872
- ]
1873
- }
1874
- ]
1875
- },
1876
- "type-operators": {
1877
- "patterns": [
1878
- {
1879
- "include": "#typeof-operator"
1880
- },
1881
- {
1882
- "name": "keyword.operator.type.tsx",
1883
- "match": "[&|]"
1884
- },
1885
- {
1886
- "name": "keyword.operator.expression.keyof.tsx",
1887
- "match": "(?<!\\.|\\$)\\bkeyof\\b(?!\\$)"
1888
- }
1889
- ]
1890
- },
1891
- "type-function-return-type": {
1892
- "name": "meta.type.function.return.tsx",
1893
- "begin": "=>",
1894
- "beginCaptures": {
1895
- "0": {
1896
- "name": "storage.type.function.arrow.tsx"
1897
- }
1898
- },
1899
- "end": "(?<!=>)(?=[,\\]\\)\\{\\}=;>]|//|$)",
1900
- "patterns": [
1901
- {
1902
- "include": "#comment"
1903
- },
1904
- {
1905
- "name": "meta.object.type.tsx",
1906
- "begin": "(?<==>)\\s*(\\{)",
1907
- "beginCaptures": {
1908
- "1": {
1909
- "name": "punctuation.definition.block.tsx"
1910
- }
1911
- },
1912
- "end": "\\}",
1913
- "endCaptures": {
1914
- "0": {
1915
- "name": "punctuation.definition.block.tsx"
1916
- }
1917
- },
1918
- "patterns": [
1919
- {
1920
- "include": "#type-object-members"
1921
- }
1922
- ]
1923
- },
1924
- {
1925
- "include": "#type-predicate-operator"
1926
- },
1927
- {
1928
- "include": "#type"
1929
- }
1930
- ]
1931
- },
1932
- "type-tuple": {
1933
- "name": "meta.type.tuple.tsx",
1934
- "begin": "\\[",
1935
- "beginCaptures": {
1936
- "0": {
1937
- "name": "meta.brace.square.tsx"
1938
- }
1939
- },
1940
- "end": "\\]",
1941
- "endCaptures": {
1942
- "0": {
1943
- "name": "meta.brace.square.tsx"
1944
- }
1945
- },
1946
- "patterns": [
1947
- {
1948
- "include": "#type"
1949
- },
1950
- {
1951
- "include": "#punctuation-comma"
1952
- }
1953
- ]
1954
- },
1955
- "type-name": {
1956
- "patterns": [
1957
- {
1958
- "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)",
1959
- "captures": {
1960
- "1": {
1961
- "name": "entity.name.type.module.tsx"
1962
- },
1963
- "2": {
1964
- "name": "punctuation.accessor.tsx"
1965
- }
1966
- }
1967
- },
1968
- {
1969
- "name": "entity.name.type.tsx",
1970
- "match": "[_$[:alpha:]][_$[:alnum:]]*"
1971
- }
1972
- ]
1973
- },
1974
- "type-parameters": {
1975
- "name": "meta.type.parameters.tsx",
1976
- "begin": "(<)",
1977
- "beginCaptures": {
1978
- "1": {
1979
- "name": "punctuation.definition.typeparameters.begin.tsx"
1980
- }
1981
- },
1982
- "end": "(?=$)|(>)",
1983
- "endCaptures": {
1984
- "1": {
1985
- "name": "punctuation.definition.typeparameters.end.tsx"
1986
- }
1987
- },
1988
- "patterns": [
1989
- {
1990
- "include": "#comment"
1991
- },
1992
- {
1993
- "name": "storage.modifier.tsx",
1994
- "match": "(?<!\\.|\\$)\\b(extends)\\b(?!\\$)"
1995
- },
1996
- {
1997
- "name": "keyword.operator.assignment.tsx",
1998
- "match": "\\=(?!>)"
1999
- },
2000
- {
2001
- "include": "#type"
2002
- },
2003
- {
2004
- "include": "#punctuation-comma"
2005
- }
2006
- ]
2007
- },
2008
- "variable-initializer": {
2009
- "patterns": [
2010
- {
2011
- "begin": "(?<!=|!)(=)(?!=)(?=\\s*\\S)",
2012
- "beginCaptures": {
2013
- "1": {
2014
- "name": "keyword.operator.assignment.tsx"
2015
- }
2016
- },
2017
- "end": "(?=$|[,);}\\]])",
2018
- "patterns": [
2019
- {
2020
- "include": "#expression"
2021
- }
2022
- ]
2023
- },
2024
- {
2025
- "begin": "(?<!=|!)(=)(?!=)",
2026
- "beginCaptures": {
2027
- "1": {
2028
- "name": "keyword.operator.assignment.tsx"
2029
- }
2030
- },
2031
- "end": "(?=[,);}\\]])|(?=^\\s*$)",
2032
- "patterns": [
2033
- {
2034
- "include": "#expression"
2035
- }
2036
- ]
2037
- }
2038
- ]
2039
- },
2040
- "for-loop": {
2041
- "begin": "(?<!\\.|\\$)\\b(for)(?:\\s+(await))?\\s*(\\()",
2042
- "beginCaptures": {
2043
- "1": {
2044
- "name": "keyword.control.loop.tsx"
2045
- },
2046
- "2": {
2047
- "name": "keyword.control.loop.tsx"
2048
- },
2049
- "3": {
2050
- "name": "meta.brace.round.tsx"
2051
- }
2052
- },
2053
- "end": "\\)",
2054
- "endCaptures": {
2055
- "0": {
2056
- "name": "meta.brace.round.tsx"
2057
- }
2058
- },
2059
- "patterns": [
2060
- {
2061
- "include": "#var-expr"
2062
- },
2063
- {
2064
- "include": "#expression"
2065
- },
2066
- {
2067
- "include": "#punctuation-semicolon"
2068
- }
2069
- ]
2070
- },
2071
- "switch-expression": {
2072
- "name": "switch-expression.expr.tsx",
2073
- "begin": "(?<!\\.|\\$)\\b(switch)\\s*(\\()",
2074
- "beginCaptures": {
2075
- "1": {
2076
- "name": "keyword.control.switch.tsx"
2077
- },
2078
- "2": {
2079
- "name": "meta.brace.round.tsx"
2080
- }
2081
- },
2082
- "end": "\\)",
2083
- "endCaptures": {
2084
- "0": {
2085
- "name": "meta.brace.round.tsx"
2086
- }
2087
- },
2088
- "patterns": [
2089
- {
2090
- "include": "#expression"
2091
- }
2092
- ]
2093
- },
2094
- "switch-block": {
2095
- "name": "switch-block.expr.tsx",
2096
- "begin": "\\{",
2097
- "beginCaptures": {
2098
- "0": {
2099
- "name": "punctuation.definition.block.tsx"
2100
- }
2101
- },
2102
- "end": "(?=\\})",
2103
- "patterns": [
2104
- {
2105
- "include": "#case-clause"
2106
- },
2107
- {
2108
- "include": "#statements"
2109
- }
2110
- ]
2111
- },
2112
- "case-clause": {
2113
- "name": "case-clause.expr.tsx",
2114
- "begin": "(?<!\\.|\\$)\\b(case|default(?=:))\\b(?!\\$)",
2115
- "beginCaptures": {
2116
- "1": {
2117
- "name": "keyword.control.switch.tsx"
2118
- }
2119
- },
2120
- "end": ":",
2121
- "endCaptures": {
2122
- "0": {
2123
- "name": "punctuation.definition.section.case-statement.tsx"
2124
- }
2125
- },
2126
- "patterns": [
2127
- {
2128
- "include": "#expression"
2129
- }
2130
- ]
2131
- },
2132
- "switch-statement": {
2133
- "name": "switch-statement.expr.tsx",
2134
- "begin": "(?<!\\.|\\$)(?=\\bswitch\\s*\\()",
2135
- "end": "\\}",
2136
- "endCaptures": {
2137
- "0": {
2138
- "name": "punctuation.definition.block.tsx"
2139
- }
2140
- },
2141
- "patterns": [
2142
- {
2143
- "include": "#switch-expression"
2144
- },
2145
- {
2146
- "include": "#switch-block"
2147
- }
2148
- ]
2149
- },
2150
- "support-objects": {
2151
- "patterns": [
2152
- {
2153
- "name": "variable.language.arguments.tsx",
2154
- "match": "(?<!\\.|\\$)\\b(arguments)\\b(?!\\$)"
2155
- },
2156
- {
2157
- "name": "support.class.builtin.tsx",
2158
- "match": "(?x)(?<!\\.|\\$)\\b(Array|ArrayBuffer|Atomics|Boolean|DataView|Date|Float32Array|Float64Array|Function|Generator\n |GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Promise|Proxy\n |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray\n |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\\b(?!\\$)"
2159
- },
2160
- {
2161
- "name": "support.class.error.tsx",
2162
- "match": "(?<!\\.|\\$)\\b((Eval|Internal|Range|Reference|Syntax|Type|URI)?Error)\\b(?!\\$)"
2163
- },
2164
- {
2165
- "name": "support.function.tsx",
2166
- "match": "(?x)(?<!\\.|\\$)\\b(clear(Interval|Timeout)|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|\n isFinite|isNaN|parseFloat|parseInt|require|set(Interval|Timeout)|super|unescape|uneval)(?=\\s*\\() "
2167
- },
2168
- {
2169
- "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(?!\\$)",
2170
- "captures": {
2171
- "1": {
2172
- "name": "support.constant.math.tsx"
2173
- },
2174
- "2": {
2175
- "name": "punctuation.accessor.tsx"
2176
- },
2177
- "3": {
2178
- "name": "support.function.math.tsx"
2179
- },
2180
- "4": {
2181
- "name": "support.constant.property.math.tsx"
2182
- }
2183
- }
2184
- },
2185
- {
2186
- "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(?!\\$)",
2187
- "captures": {
2188
- "1": {
2189
- "name": "support.class.console.tsx"
2190
- },
2191
- "2": {
2192
- "name": "punctuation.accessor.tsx"
2193
- },
2194
- "3": {
2195
- "name": "support.function.console.tsx"
2196
- }
2197
- }
2198
- },
2199
- {
2200
- "match": "(?<!\\.|\\$)\\b(JSON)(?:\\s*(\\.)\\s*(parse|stringify))?\\b(?!\\$)",
2201
- "captures": {
2202
- "1": {
2203
- "name": "support.constant.json.tsx"
2204
- },
2205
- "2": {
2206
- "name": "punctuation.accessor.tsx"
2207
- },
2208
- "3": {
2209
- "name": "support.function.json.tsx"
2210
- }
2211
- }
2212
- },
2213
- {
2214
- "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(?!\\$)",
2215
- "captures": {
2216
- "1": {
2217
- "name": "punctuation.accessor.tsx"
2218
- },
2219
- "2": {
2220
- "name": "support.variable.property.tsx"
2221
- },
2222
- "3": {
2223
- "name": "support.constant.tsx"
2224
- }
2225
- }
2226
- },
2227
- {
2228
- "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(?!\\$)",
2229
- "captures": {
2230
- "1": {
2231
- "name": "support.variable.dom.tsx"
2232
- },
2233
- "2": {
2234
- "name": "support.class.dom.tsx"
2235
- }
2236
- }
2237
- },
2238
- {
2239
- "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*)?\\()",
2240
- "captures": {
2241
- "1": {
2242
- "name": "punctuation.accessor.tsx"
2243
- },
2244
- "2": {
2245
- "name": "support.constant.dom.tsx"
2246
- },
2247
- "3": {
2248
- "name": "support.variable.property.dom.tsx"
2249
- }
2250
- }
2251
- },
2252
- {
2253
- "name": "support.class.node.tsx",
2254
- "match": "(?x)(?<!\\.|\\$)\\b(Buffer|EventEmitter|Server|Pipe|Socket|REPLServer|ReadStream|WriteStream|Stream\n |Inflate|Deflate|InflateRaw|DeflateRaw|GZip|GUnzip|Unzip|Zip)\\b(?!\\$)"
2255
- },
2256
- {
2257
- "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(?!\\$)",
2258
- "captures": {
2259
- "1": {
2260
- "name": "support.variable.object.process.tsx"
2261
- },
2262
- "2": {
2263
- "name": "punctuation.accessor.tsx"
2264
- },
2265
- "3": {
2266
- "name": "support.variable.property.process.tsx"
2267
- },
2268
- "4": {
2269
- "name": "support.function.process.tsx"
2270
- }
2271
- }
2272
- },
2273
- {
2274
- "match": "(?<!\\.|\\$)\\b(?:(exports)|(module)(?:(\\.)(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)",
2275
- "captures": {
2276
- "1": {
2277
- "name": "support.type.object.module.tsx"
2278
- },
2279
- "2": {
2280
- "name": "support.type.object.module.tsx"
2281
- },
2282
- "3": {
2283
- "name": "punctuation.accessor.tsx"
2284
- },
2285
- "4": {
2286
- "name": "support.type.object.module.tsx"
2287
- }
2288
- }
2289
- },
2290
- {
2291
- "name": "support.variable.object.node.tsx",
2292
- "match": "(?<!\\.|\\$)\\b(global|GLOBAL|root|__dirname|__filename)\\b(?!\\$)"
2293
- },
2294
- {
2295
- "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*\\()",
2296
- "captures": {
2297
- "1": {
2298
- "name": "punctuation.accessor.tsx"
2299
- },
2300
- "2": {
2301
- "name": "support.function.event-handler.tsx"
2302
- },
2303
- "3": {
2304
- "name": "support.function.tsx"
2305
- },
2306
- "4": {
2307
- "name": "support.function.dom.tsx"
2308
- }
2309
- }
2310
- }
2311
- ]
2312
- },
2313
- "function-call": {
2314
- "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
2315
- "end": "(?<=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
2316
- "patterns": [
2317
- {
2318
- "include": "#literal"
2319
- },
2320
- {
2321
- "include": "#support-objects"
2322
- },
2323
- {
2324
- "include": "#object-identifiers"
2325
- },
2326
- {
2327
- "include": "#punctuation-accessor"
2328
- },
2329
- {
2330
- "name": "entity.name.function.tsx",
2331
- "match": "([_$[:alpha:]][_$[:alnum:]]*)"
2332
- },
2333
- {
2334
- "include": "#comment"
2335
- },
2336
- {
2337
- "name": "meta.type.parameters.tsx",
2338
- "begin": "\\<",
2339
- "beginCaptures": {
2340
- "0": {
2341
- "name": "punctuation.definition.typeparameters.begin.tsx"
2342
- }
2343
- },
2344
- "end": "\\>",
2345
- "endCaptures": {
2346
- "0": {
2347
- "name": "punctuation.definition.typeparameters.end.tsx"
2348
- }
2349
- },
2350
- "patterns": [
2351
- {
2352
- "include": "#type"
2353
- },
2354
- {
2355
- "include": "#punctuation-comma"
2356
- }
2357
- ]
2358
- },
2359
- {
2360
- "include": "#paren-expression"
2361
- }
2362
- ]
2363
- },
2364
- "identifiers": {
2365
- "patterns": [
2366
- {
2367
- "include": "#object-identifiers"
2368
- },
2369
- {
2370
- "match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n (async\\s+)|(function\\s*[(<])|(function\\s+)|\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)|\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)))",
2371
- "captures": {
2372
- "1": {
2373
- "name": "punctuation.accessor.tsx"
2374
- },
2375
- "2": {
2376
- "name": "entity.name.function.tsx"
2377
- }
2378
- }
2379
- },
2380
- {
2381
- "match": "(\\.)\\s*([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
2382
- "captures": {
2383
- "1": {
2384
- "name": "punctuation.accessor.tsx"
2385
- },
2386
- "2": {
2387
- "name": "variable.other.constant.property.tsx"
2388
- }
2389
- }
2390
- },
2391
- {
2392
- "match": "(\\.)\\s*([_$[:alpha:]][_$[:alnum:]]*)",
2393
- "captures": {
2394
- "1": {
2395
- "name": "punctuation.accessor.tsx"
2396
- },
2397
- "2": {
2398
- "name": "variable.other.property.tsx"
2399
- }
2400
- }
2401
- },
2402
- {
2403
- "name": "variable.other.constant.tsx",
2404
- "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
2405
- },
2406
- {
2407
- "name": "variable.other.readwrite.tsx",
2408
- "match": "[_$[:alpha:]][_$[:alnum:]]*"
2409
- }
2410
- ]
2411
- },
2412
- "object-identifiers": {
2413
- "patterns": [
2414
- {
2415
- "name": "support.class.tsx",
2416
- "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\.\\s*prototype\\b(?!\\$))"
2417
- },
2418
- {
2419
- "match": "(?x)(\\.)\\s*(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
2420
- "captures": {
2421
- "1": {
2422
- "name": "punctuation.accessor.tsx"
2423
- },
2424
- "2": {
2425
- "name": "variable.other.constant.object.property.tsx"
2426
- },
2427
- "3": {
2428
- "name": "variable.other.object.property.tsx"
2429
- }
2430
- }
2431
- },
2432
- {
2433
- "match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
2434
- "captures": {
2435
- "1": {
2436
- "name": "variable.other.constant.object.tsx"
2437
- },
2438
- "2": {
2439
- "name": "variable.other.object.tsx"
2440
- }
2441
- }
2442
- }
2443
- ]
2444
- },
2445
- "cast": {
2446
- "patterns": [
2447
- {
2448
- "include": "#jsx"
2449
- }
2450
- ]
2451
- },
2452
- "new-expr": {
2453
- "name": "new.expr.tsx",
2454
- "begin": "(?<!\\.|\\$)\\b(new)\\b(?!\\$)",
2455
- "beginCaptures": {
2456
- "1": {
2457
- "name": "keyword.operator.new.tsx"
2458
- }
2459
- },
2460
- "end": "(?<=\\))|(?=[;),}]|$|((?<!\\.|\\$)\\bnew\\b(?!\\$)))",
2461
- "patterns": [
2462
- {
2463
- "include": "#paren-expression"
2464
- },
2465
- {
2466
- "include": "#class-or-interface-declaration"
2467
- },
2468
- {
2469
- "include": "#type"
2470
- }
2471
- ]
2472
- },
2473
- "object-member": {
2474
- "patterns": [
2475
- {
2476
- "include": "#comment"
2477
- },
2478
- {
2479
- "include": "#object-literal-method-declaration"
2480
- },
2481
- {
2482
- "name": "meta.object.member.tsx",
2483
- "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)",
2484
- "end": "(?=,|\\})",
2485
- "patterns": [
2486
- {
2487
- "name": "meta.object-literal.key.tsx",
2488
- "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)",
2489
- "end": ":",
2490
- "endCaptures": {
2491
- "0": {
2492
- "name": "punctuation.separator.key-value.tsx"
2493
- }
2494
- },
2495
- "patterns": [
2496
- {
2497
- "include": "#string"
2498
- },
2499
- {
2500
- "include": "#array-literal"
2501
- }
2502
- ]
2503
- },
2504
- {
2505
- "include": "#expression"
2506
- }
2507
- ]
2508
- },
2509
- {
2510
- "name": "meta.object.member.tsx",
2511
- "begin": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)(?=\\s*(\n (async\\s+)|(function\\s*[(<])|(function\\s+)|\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)|\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>))))",
2512
- "beginCaptures": {
2513
- "0": {
2514
- "name": "meta.object-literal.key.tsx"
2515
- },
2516
- "1": {
2517
- "name": "entity.name.function.tsx"
2518
- },
2519
- "2": {
2520
- "name": "punctuation.separator.key-value.tsx"
2521
- }
2522
- },
2523
- "end": "(?=,|\\})",
2524
- "patterns": [
2525
- {
2526
- "include": "#expression"
2527
- }
2528
- ]
2529
- },
2530
- {
2531
- "name": "meta.object.member.tsx",
2532
- "begin": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(:)",
2533
- "beginCaptures": {
2534
- "0": {
2535
- "name": "meta.object-literal.key.tsx"
2536
- },
2537
- "1": {
2538
- "name": "punctuation.separator.key-value.tsx"
2539
- }
2540
- },
2541
- "end": "(?=,|\\})",
2542
- "patterns": [
2543
- {
2544
- "include": "#expression"
2545
- }
2546
- ]
2547
- },
2548
- {
2549
- "name": "meta.object.member.tsx",
2550
- "begin": "\\.\\.\\.",
2551
- "beginCaptures": {
2552
- "0": {
2553
- "name": "keyword.operator.spread.tsx"
2554
- }
2555
- },
2556
- "end": "(?=,|\\})",
2557
- "patterns": [
2558
- {
2559
- "include": "#expression"
2560
- }
2561
- ]
2562
- },
2563
- {
2564
- "name": "meta.object.member.tsx",
2565
- "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$)",
2566
- "captures": {
2567
- "1": {
2568
- "name": "variable.other.readwrite.tsx"
2569
- }
2570
- }
2571
- },
2572
- {
2573
- "include": "#punctuation-comma"
2574
- }
2575
- ]
2576
- },
2577
- "expression-operators": {
2578
- "patterns": [
2579
- {
2580
- "name": "keyword.control.flow.tsx",
2581
- "match": "(?<!\\.|\\$)\\b(await)\\b(?!\\$)"
2582
- },
2583
- {
2584
- "match": "(?<!\\.|\\$)\\b(yield)\\b(?!\\$)(?:\\s*(\\*))?",
2585
- "captures": {
2586
- "1": {
2587
- "name": "keyword.control.flow.tsx"
2588
- },
2589
- "2": {
2590
- "name": "keyword.generator.asterisk.tsx"
2591
- }
2592
- }
2593
- },
2594
- {
2595
- "name": "keyword.operator.expression.delete.tsx",
2596
- "match": "(?<!\\.|\\$)\\bdelete\\b(?!\\$)"
2597
- },
2598
- {
2599
- "name": "keyword.operator.expression.in.tsx",
2600
- "match": "(?<!\\.|\\$)\\bin\\b(?!\\$)"
2601
- },
2602
- {
2603
- "name": "keyword.operator.expression.of.tsx",
2604
- "match": "(?<!\\.|\\$)\\bof\\b(?!\\$)"
2605
- },
2606
- {
2607
- "name": "keyword.operator.expression.instanceof.tsx",
2608
- "match": "(?<!\\.|\\$)\\binstanceof\\b(?!\\$)"
2609
- },
2610
- {
2611
- "name": "keyword.operator.new.tsx",
2612
- "match": "(?<!\\.|\\$)\\bnew\\b(?!\\$)"
2613
- },
2614
- {
2615
- "include": "#typeof-operator"
2616
- },
2617
- {
2618
- "name": "keyword.operator.expression.void.tsx",
2619
- "match": "(?<!\\.|\\$)\\bvoid\\b(?!\\$)"
2620
- },
2621
- {
2622
- "begin": "(?<!\\.|\\$)\\bas\\b(?!\\$)",
2623
- "beginCaptures": {
2624
- "0": {
2625
- "name": "keyword.control.as.tsx"
2626
- }
2627
- },
2628
- "end": "(?=$|[;,:})\\]])",
2629
- "patterns": [
2630
- {
2631
- "include": "#type"
2632
- }
2633
- ]
2634
- },
2635
- {
2636
- "name": "keyword.operator.spread.tsx",
2637
- "match": "\\.\\.\\."
2638
- },
2639
- {
2640
- "name": "keyword.operator.assignment.compound.tsx",
2641
- "match": "\\*=|(?<!\\()/=|%=|\\+=|\\-="
2642
- },
2643
- {
2644
- "name": "keyword.operator.assignment.compound.bitwise.tsx",
2645
- "match": "\\&=|\\^=|<<=|>>=|>>>=|\\|="
2646
- },
2647
- {
2648
- "name": "keyword.operator.bitwise.shift.tsx",
2649
- "match": "<<|>>>|>>"
2650
- },
2651
- {
2652
- "name": "keyword.operator.comparison.tsx",
2653
- "match": "===|!==|==|!="
2654
- },
2655
- {
2656
- "name": "keyword.operator.relational.tsx",
2657
- "match": "<=|>=|<>|<|>"
2658
- },
2659
- {
2660
- "name": "keyword.operator.logical.tsx",
2661
- "match": "\\!|&&|\\|\\|"
2662
- },
2663
- {
2664
- "name": "keyword.operator.bitwise.tsx",
2665
- "match": "\\&|~|\\^|\\|"
2666
- },
2667
- {
2668
- "name": "keyword.operator.assignment.tsx",
2669
- "match": "\\="
2670
- },
2671
- {
2672
- "name": "keyword.operator.decrement.tsx",
2673
- "match": "--"
2674
- },
2675
- {
2676
- "name": "keyword.operator.increment.tsx",
2677
- "match": "\\+\\+"
2678
- },
2679
- {
2680
- "name": "keyword.operator.arithmetic.tsx",
2681
- "match": "%|\\*|/|-|\\+"
2682
- },
2683
- {
2684
- "match": "(?<=[_$[:alnum:])])\\s*(/)(?![/*])",
2685
- "captures": {
2686
- "1": {
2687
- "name": "keyword.operator.arithmetic.tsx"
2688
- }
2689
- }
2690
- }
2691
- ]
2692
- },
2693
- "typeof-operator": {
2694
- "name": "keyword.operator.expression.typeof.tsx",
2695
- "match": "(?<!\\.|\\$)\\btypeof\\b(?!\\$)"
2696
- },
2697
- "arrow-function": {
2698
- "patterns": [
2699
- {
2700
- "name": "meta.arrow.tsx",
2701
- "match": "(?:(?<!\\.|\\$)(\\basync)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?==>)",
2702
- "captures": {
2703
- "1": {
2704
- "name": "storage.modifier.async.tsx"
2705
- },
2706
- "2": {
2707
- "name": "variable.parameter.tsx"
2708
- }
2709
- }
2710
- },
2711
- {
2712
- "name": "meta.arrow.tsx",
2713
- "begin": "(?x) (?:\n (?<!\\.|\\$)(\\basync)(?=\\s*[<(])\n) | ((?<![})\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ([_$[:alpha:]][_$[:alnum:]]*\\s*:) | # [(]param:\n (\\.\\.\\.) # [(]...\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>]|\\<[^<>]+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)",
2714
- "beginCaptures": {
2715
- "1": {
2716
- "name": "storage.modifier.async.tsx"
2717
- }
2718
- },
2719
- "end": "(?==>|\\{)",
2720
- "patterns": [
2721
- {
2722
- "include": "#comment"
2723
- },
2724
- {
2725
- "include": "#type-parameters"
2726
- },
2727
- {
2728
- "include": "#function-parameters"
2729
- },
2730
- {
2731
- "include": "#arrow-return-type"
2732
- }
2733
- ]
2734
- },
2735
- {
2736
- "name": "meta.arrow.tsx",
2737
- "begin": "=>",
2738
- "beginCaptures": {
2739
- "0": {
2740
- "name": "storage.type.function.arrow.tsx"
2741
- }
2742
- },
2743
- "end": "(?<=\\})|((?!\\{)(?=\\S))",
2744
- "patterns": [
2745
- {
2746
- "include": "#decl-block"
2747
- },
2748
- {
2749
- "include": "#expression"
2750
- }
2751
- ]
2752
- }
2753
- ]
2754
- },
2755
- "arrow-return-type": {
2756
- "name": "meta.return.type.arrow.tsx",
2757
- "begin": "(?<=\\))\\s*(:)",
2758
- "beginCaptures": {
2759
- "1": {
2760
- "name": "keyword.operator.type.annotation.tsx"
2761
- }
2762
- },
2763
- "end": "(?==>|\\{)",
2764
- "patterns": [
2765
- {
2766
- "name": "meta.object.type.tsx",
2767
- "begin": "(?<=:)\\s*(\\{)",
2768
- "beginCaptures": {
2769
- "1": {
2770
- "name": "punctuation.definition.block.tsx"
2771
- }
2772
- },
2773
- "end": "\\}",
2774
- "endCaptures": {
2775
- "0": {
2776
- "name": "punctuation.definition.block.tsx"
2777
- }
2778
- },
2779
- "patterns": [
2780
- {
2781
- "include": "#type-object-members"
2782
- }
2783
- ]
2784
- },
2785
- {
2786
- "include": "#type-predicate-operator"
2787
- },
2788
- {
2789
- "include": "#type"
2790
- }
2791
- ]
2792
- },
2793
- "punctuation-comma": {
2794
- "name": "punctuation.separator.comma.tsx",
2795
- "match": ","
2796
- },
2797
- "punctuation-semicolon": {
2798
- "name": "punctuation.terminator.statement.tsx",
2799
- "match": ";"
2800
- },
2801
- "punctuation-accessor": {
2802
- "name": "punctuation.accessor.tsx",
2803
- "match": "\\."
2804
- },
2805
- "paren-expression": {
2806
- "begin": "\\(",
2807
- "beginCaptures": {
2808
- "0": {
2809
- "name": "meta.brace.round.tsx"
2810
- }
2811
- },
2812
- "end": "\\)",
2813
- "endCaptures": {
2814
- "0": {
2815
- "name": "meta.brace.round.tsx"
2816
- }
2817
- },
2818
- "patterns": [
2819
- {
2820
- "include": "#expression"
2821
- },
2822
- {
2823
- "include": "#punctuation-comma"
2824
- }
2825
- ]
2826
- },
2827
- "qstring-double": {
2828
- "name": "string.quoted.double.tsx",
2829
- "begin": "\"",
2830
- "beginCaptures": {
2831
- "0": {
2832
- "name": "punctuation.definition.string.begin.tsx"
2833
- }
2834
- },
2835
- "end": "(\")|((?:[^\\\\\\n])$)",
2836
- "endCaptures": {
2837
- "1": {
2838
- "name": "punctuation.definition.string.end.tsx"
2839
- },
2840
- "2": {
2841
- "name": "invalid.illegal.newline.tsx"
2842
- }
2843
- },
2844
- "patterns": [
2845
- {
2846
- "include": "#string-character-escape"
2847
- }
2848
- ]
2849
- },
2850
- "qstring-single": {
2851
- "name": "string.quoted.single.tsx",
2852
- "begin": "'",
2853
- "beginCaptures": {
2854
- "0": {
2855
- "name": "punctuation.definition.string.begin.tsx"
2856
- }
2857
- },
2858
- "end": "(\\')|((?:[^\\\\\\n])$)",
2859
- "endCaptures": {
2860
- "1": {
2861
- "name": "punctuation.definition.string.end.tsx"
2862
- },
2863
- "2": {
2864
- "name": "invalid.illegal.newline.tsx"
2865
- }
2866
- },
2867
- "patterns": [
2868
- {
2869
- "include": "#string-character-escape"
2870
- }
2871
- ]
2872
- },
2873
- "regex": {
2874
- "patterns": [
2875
- {
2876
- "name": "string.regexp.tsx",
2877
- "begin": "(?<=[=(:,\\[?+!]|return|case|=>|&&|\\|\\||\\*\\/)\\s*(/)(?![/*])(?=(?:[^/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+/(?![/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))",
2878
- "beginCaptures": {
2879
- "1": {
2880
- "name": "punctuation.definition.string.begin.tsx"
2881
- }
2882
- },
2883
- "end": "(/)([gimuy]*)",
2884
- "endCaptures": {
2885
- "1": {
2886
- "name": "punctuation.definition.string.end.tsx"
2887
- },
2888
- "2": {
2889
- "name": "keyword.other.tsx"
2890
- }
2891
- },
2892
- "patterns": [
2893
- {
2894
- "include": "#regexp"
2895
- }
2896
- ]
2897
- },
2898
- {
2899
- "name": "string.regexp.tsx",
2900
- "begin": "(?<![_$[:alnum:]])/(?![/*])(?=(?:[^/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+/(?![/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))",
2901
- "beginCaptures": {
2902
- "0": {
2903
- "name": "punctuation.definition.string.begin.tsx"
2904
- }
2905
- },
2906
- "end": "(/)([gimuy]*)",
2907
- "endCaptures": {
2908
- "1": {
2909
- "name": "punctuation.definition.string.end.tsx"
2910
- },
2911
- "2": {
2912
- "name": "keyword.other.tsx"
2913
- }
2914
- },
2915
- "patterns": [
2916
- {
2917
- "include": "#regexp"
2918
- }
2919
- ]
2920
- }
2921
- ]
2922
- },
2923
- "regexp": {
2924
- "patterns": [
2925
- {
2926
- "name": "keyword.control.anchor.regexp",
2927
- "match": "\\\\[bB]|\\^|\\$"
2928
- },
2929
- {
2930
- "name": "keyword.other.back-reference.regexp",
2931
- "match": "\\\\[1-9]\\d*"
2932
- },
2933
- {
2934
- "name": "keyword.operator.quantifier.regexp",
2935
- "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??"
2936
- },
2937
- {
2938
- "name": "keyword.operator.or.regexp",
2939
- "match": "\\|"
2940
- },
2941
- {
2942
- "name": "meta.group.assertion.regexp",
2943
- "begin": "(\\()((\\?=)|(\\?!))",
2944
- "beginCaptures": {
2945
- "1": {
2946
- "name": "punctuation.definition.group.regexp"
2947
- },
2948
- "2": {
2949
- "name": "punctuation.definition.group.assertion.regexp"
2950
- },
2951
- "3": {
2952
- "name": "meta.assertion.look-ahead.regexp"
2953
- },
2954
- "4": {
2955
- "name": "meta.assertion.negative-look-ahead.regexp"
2956
- }
2957
- },
2958
- "end": "(\\))",
2959
- "endCaptures": {
2960
- "1": {
2961
- "name": "punctuation.definition.group.regexp"
2962
- }
2963
- },
2964
- "patterns": [
2965
- {
2966
- "include": "#regexp"
2967
- }
2968
- ]
2969
- },
2970
- {
2971
- "name": "meta.group.regexp",
2972
- "begin": "\\((\\?:)?",
2973
- "beginCaptures": {
2974
- "0": {
2975
- "name": "punctuation.definition.group.regexp"
2976
- },
2977
- "1": {
2978
- "name": "punctuation.definition.group.capture.regexp"
2979
- }
2980
- },
2981
- "end": "\\)",
2982
- "endCaptures": {
2983
- "0": {
2984
- "name": "punctuation.definition.group.regexp"
2985
- }
2986
- },
2987
- "patterns": [
2988
- {
2989
- "include": "#regexp"
2990
- }
2991
- ]
2992
- },
2993
- {
2994
- "name": "constant.other.character-class.set.regexp",
2995
- "begin": "(\\[)(\\^)?",
2996
- "beginCaptures": {
2997
- "1": {
2998
- "name": "punctuation.definition.character-class.regexp"
2999
- },
3000
- "2": {
3001
- "name": "keyword.operator.negation.regexp"
3002
- }
3003
- },
3004
- "end": "(\\])",
3005
- "endCaptures": {
3006
- "1": {
3007
- "name": "punctuation.definition.character-class.regexp"
3008
- }
3009
- },
3010
- "patterns": [
3011
- {
3012
- "name": "constant.other.character-class.range.regexp",
3013
- "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])|(\\\\.))",
3014
- "captures": {
3015
- "1": {
3016
- "name": "constant.character.numeric.regexp"
3017
- },
3018
- "2": {
3019
- "name": "constant.character.control.regexp"
3020
- },
3021
- "3": {
3022
- "name": "constant.character.escape.backslash.regexp"
3023
- },
3024
- "4": {
3025
- "name": "constant.character.numeric.regexp"
3026
- },
3027
- "5": {
3028
- "name": "constant.character.control.regexp"
3029
- },
3030
- "6": {
3031
- "name": "constant.character.escape.backslash.regexp"
3032
- }
3033
- }
3034
- },
3035
- {
3036
- "include": "#regex-character-class"
3037
- }
3038
- ]
3039
- },
3040
- {
3041
- "include": "#regex-character-class"
3042
- }
3043
- ]
3044
- },
3045
- "regex-character-class": {
3046
- "patterns": [
3047
- {
3048
- "name": "constant.other.character-class.regexp",
3049
- "match": "\\\\[wWsSdDtrnvf]|\\."
3050
- },
3051
- {
3052
- "name": "constant.character.numeric.regexp",
3053
- "match": "\\\\([0-7]{3}|x\\h\\h|u\\h\\h\\h\\h)"
3054
- },
3055
- {
3056
- "name": "constant.character.control.regexp",
3057
- "match": "\\\\c[A-Z]"
3058
- },
3059
- {
3060
- "name": "constant.character.escape.backslash.regexp",
3061
- "match": "\\\\."
3062
- }
3063
- ]
3064
- },
3065
- "string": {
3066
- "patterns": [
3067
- {
3068
- "include": "#qstring-single"
3069
- },
3070
- {
3071
- "include": "#qstring-double"
3072
- }
3073
- ]
3074
- },
3075
- "template": {
3076
- "name": "string.template.tsx",
3077
- "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
3078
- "beginCaptures": {
3079
- "1": {
3080
- "name": "entity.name.function.tagged-template.tsx"
3081
- },
3082
- "2": {
3083
- "name": "punctuation.definition.string.template.begin.tsx"
3084
- }
3085
- },
3086
- "end": "`",
3087
- "endCaptures": {
3088
- "0": {
3089
- "name": "punctuation.definition.string.template.end.tsx"
3090
- }
3091
- },
3092
- "patterns": [
3093
- {
3094
- "include": "#template-substitution-element"
3095
- },
3096
- {
3097
- "include": "#string-character-escape"
3098
- }
3099
- ]
3100
- },
3101
- "string-character-escape": {
3102
- "name": "constant.character.escape.tsx",
3103
- "match": "\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)"
3104
- },
3105
- "template-substitution-element": {
3106
- "name": "meta.template.expression.tsx",
3107
- "begin": "\\$\\{",
3108
- "beginCaptures": {
3109
- "0": {
3110
- "name": "punctuation.definition.template-expression.begin.tsx"
3111
- }
3112
- },
3113
- "end": "\\}",
3114
- "endCaptures": {
3115
- "0": {
3116
- "name": "punctuation.definition.template-expression.end.tsx"
3117
- }
3118
- },
3119
- "patterns": [
3120
- {
3121
- "include": "#expression"
3122
- }
3123
- ]
3124
- },
3125
- "literal": {
3126
- "patterns": [
3127
- {
3128
- "include": "#numeric-literal"
3129
- },
3130
- {
3131
- "include": "#boolean-literal"
3132
- },
3133
- {
3134
- "include": "#null-literal"
3135
- },
3136
- {
3137
- "include": "#undefined-literal"
3138
- },
3139
- {
3140
- "include": "#numericConstant-literal"
3141
- },
3142
- {
3143
- "include": "#array-literal"
3144
- },
3145
- {
3146
- "include": "#this-literal"
3147
- },
3148
- {
3149
- "include": "#super-literal"
3150
- }
3151
- ]
3152
- },
3153
- "array-literal": {
3154
- "name": "meta.array.literal.tsx",
3155
- "begin": "\\[",
3156
- "beginCaptures": {
3157
- "0": {
3158
- "name": "meta.brace.square.tsx"
3159
- }
3160
- },
3161
- "end": "\\]",
3162
- "endCaptures": {
3163
- "0": {
3164
- "name": "meta.brace.square.tsx"
3165
- }
3166
- },
3167
- "patterns": [
3168
- {
3169
- "include": "#expression"
3170
- },
3171
- {
3172
- "include": "#punctuation-comma"
3173
- }
3174
- ]
3175
- },
3176
- "numeric-literal": {
3177
- "patterns": [
3178
- {
3179
- "name": "constant.numeric.hex.tsx",
3180
- "match": "\\b(?<!\\$)0(x|X)[0-9a-fA-F]+\\b(?!\\$)"
3181
- },
3182
- {
3183
- "name": "constant.numeric.binary.tsx",
3184
- "match": "\\b(?<!\\$)0(b|B)[01]+\\b(?!\\$)"
3185
- },
3186
- {
3187
- "name": "constant.numeric.octal.tsx",
3188
- "match": "\\b(?<!\\$)0(o|O)?[0-7]+\\b(?!\\$)"
3189
- },
3190
- {
3191
- "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)(?!\\$)",
3192
- "captures": {
3193
- "0": {
3194
- "name": "constant.numeric.decimal.tsx"
3195
- },
3196
- "1": {
3197
- "name": "meta.delimiter.decimal.period.tsx"
3198
- },
3199
- "2": {
3200
- "name": "meta.delimiter.decimal.period.tsx"
3201
- },
3202
- "3": {
3203
- "name": "meta.delimiter.decimal.period.tsx"
3204
- },
3205
- "4": {
3206
- "name": "meta.delimiter.decimal.period.tsx"
3207
- },
3208
- "5": {
3209
- "name": "meta.delimiter.decimal.period.tsx"
3210
- },
3211
- "6": {
3212
- "name": "meta.delimiter.decimal.period.tsx"
3213
- }
3214
- }
3215
- }
3216
- ]
3217
- },
3218
- "boolean-literal": {
3219
- "patterns": [
3220
- {
3221
- "name": "constant.language.boolean.true.tsx",
3222
- "match": "(?<!\\.|\\$)\\btrue\\b(?!\\$)"
3223
- },
3224
- {
3225
- "name": "constant.language.boolean.false.tsx",
3226
- "match": "(?<!\\.|\\$)\\bfalse\\b(?!\\$)"
3227
- }
3228
- ]
3229
- },
3230
- "null-literal": {
3231
- "name": "constant.language.null.tsx",
3232
- "match": "(?<!\\.|\\$)\\bnull\\b(?!\\$)"
3233
- },
3234
- "this-literal": {
3235
- "name": "variable.language.this.tsx",
3236
- "match": "(?<!\\.|\\$)\\bthis\\b(?!\\$)"
3237
- },
3238
- "super-literal": {
3239
- "name": "variable.language.super.tsx",
3240
- "match": "(?<!\\.|\\$)\\bsuper\\b(?!\\$)"
3241
- },
3242
- "undefined-literal": {
3243
- "name": "constant.language.undefined.tsx",
3244
- "match": "(?<!\\.|\\$)\\bundefined\\b(?!\\$)"
3245
- },
3246
- "numericConstant-literal": {
3247
- "patterns": [
3248
- {
3249
- "name": "constant.language.nan.tsx",
3250
- "match": "(?<!\\.|\\$)\\bNaN\\b(?!\\$)"
3251
- },
3252
- {
3253
- "name": "constant.language.infinity.tsx",
3254
- "match": "(?<!\\.|\\$)\\bInfinity\\b(?!\\$)"
3255
- }
3256
- ]
3257
- },
3258
- "access-modifier": {
3259
- "name": "storage.modifier.tsx",
3260
- "match": "(?<!\\.|\\$)\\b(abstract|public|protected|private|readonly|static)\\b(?!\\$)"
3261
- },
3262
- "property-accessor": {
3263
- "name": "storage.type.property.tsx",
3264
- "match": "(?<!\\.|\\$)\\b(get|set)\\b(?!\\$)"
3265
- },
3266
- "comment": {
3267
- "patterns": [
3268
- {
3269
- "name": "comment.block.documentation.tsx",
3270
- "begin": "/\\*\\*(?!/)",
3271
- "beginCaptures": {
3272
- "0": {
3273
- "name": "punctuation.definition.comment.tsx"
3274
- }
3275
- },
3276
- "end": "\\*/",
3277
- "endCaptures": {
3278
- "0": {
3279
- "name": "punctuation.definition.comment.tsx"
3280
- }
3281
- },
3282
- "patterns": [
3283
- {
3284
- "include": "#docblock"
3285
- }
3286
- ]
3287
- },
3288
- {
3289
- "name": "comment.block.tsx",
3290
- "begin": "/\\*",
3291
- "beginCaptures": {
3292
- "0": {
3293
- "name": "punctuation.definition.comment.tsx"
3294
- }
3295
- },
3296
- "end": "\\*/",
3297
- "endCaptures": {
3298
- "0": {
3299
- "name": "punctuation.definition.comment.tsx"
3300
- }
3301
- }
3302
- },
3303
- {
3304
- "begin": "(^[ \\t]+)?(?=//)",
3305
- "beginCaptures": {
3306
- "1": {
3307
- "name": "punctuation.whitespace.comment.leading.tsx"
3308
- }
3309
- },
3310
- "end": "(?=$)",
3311
- "patterns": [
3312
- {
3313
- "name": "comment.line.double-slash.tsx",
3314
- "begin": "//",
3315
- "beginCaptures": {
3316
- "0": {
3317
- "name": "punctuation.definition.comment.tsx"
3318
- }
3319
- },
3320
- "end": "(?=$)"
3321
- }
3322
- ]
3323
- }
3324
- ]
3325
- },
3326
- "directives": {
3327
- "name": "comment.line.triple-slash.directive.tsx",
3328
- "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|name)\\s*=\\s*((\\'[^']*\\')|(\\\"[^\"]*\\\")))+\\s*/>\\s*$)",
3329
- "beginCaptures": {
3330
- "1": {
3331
- "name": "punctuation.definition.comment.tsx"
3332
- }
3333
- },
3334
- "end": "(?=$)",
3335
- "patterns": [
3336
- {
3337
- "name": "meta.tag.tsx",
3338
- "begin": "(<)(reference|amd-dependency|amd-module)",
3339
- "beginCaptures": {
3340
- "1": {
3341
- "name": "punctuation.definition.tag.directive.tsx"
3342
- },
3343
- "2": {
3344
- "name": "entity.name.tag.directive.tsx"
3345
- }
3346
- },
3347
- "end": "/>",
3348
- "endCaptures": {
3349
- "0": {
3350
- "name": "punctuation.definition.tag.directive.tsx"
3351
- }
3352
- },
3353
- "patterns": [
3354
- {
3355
- "name": "entity.other.attribute-name.directive.tsx",
3356
- "match": "path|types|no-default-lib|name"
3357
- },
3358
- {
3359
- "name": "keyword.operator.assignment.tsx",
3360
- "match": "="
3361
- },
3362
- {
3363
- "include": "#string"
3364
- }
3365
- ]
3366
- }
3367
- ]
3368
- },
3369
- "docblock": {
3370
- "patterns": [
3371
- {
3372
- "name": "storage.type.class.jsdoc",
3373
- "match": "(?x)(?<!\\w)@(\n abstract|access|alias|arg|argument|async|attribute|augments|author|beta|borrows|bubbes|callback|chainable|class\n |classdesc|code|config|const|constant|constructor|constructs|copyright|default|defaultvalue|define|deprecated|desc\n |description|dict|emits|enum|event|example|exports?|extends|extension|extension_for|extensionfor|external|file\n |fileoverview|final|fires|for|function|global|host|ignore|implements|implicitCast|inherit[Dd]oc|inner|instance\n |interface|kind|lends|license|listens|main|member|memberof|method|mixex|mixins?|modifies|module|name|namespace\n |noalias|nocollapse|nocompile|nosideeffects|override|overview|package|param|preserve|private|prop|property\n |protected|public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary|suppress\n |template|this|throws|todo|type|typedef|unrestricted|uses|var|variation|version|virtual|writeOnce)\\b"
3374
- },
3375
- {
3376
- "name": "other.meta.jsdoc",
3377
- "match": "(?x)\n(\n \\[\n [^\\]]+ # Optional [link text] preceding {@link syntax}\n \\]\n\n (?! # Check to avoid highlighting two sets of link text\n {\n @\\w+ # Tagname\n \\s+\n [^\\s|}]+ # Namepath/URL\n [\\s|] # Whitespace or bar delimiting description\n [^}]*\n }\n )\n)?\n\n(?:\n {\n (\n @\n (?: link # Name of tag\n | linkcode\n | linkplain\n | tutorial\n )\n )\n\n \\s+\n\n ([^\\s|}]+) # Namepath or URL\n\n (?: # Optional link text following link target\n [\\s|] # Bar or space separating target and text\n [^}]* # Actual text\n )?\n }\n)",
3378
- "captures": {
3379
- "0": {
3380
- "name": "entity.name.type.instance.jsdoc"
3381
- },
3382
- "1": {
3383
- "name": "constant.other.description.jsdoc"
3384
- },
3385
- "2": {
3386
- "name": "storage.type.class.jsdoc"
3387
- },
3388
- "3": {
3389
- "name": "variable.other.description.jsdoc"
3390
- }
3391
- }
3392
- },
3393
- {
3394
- "match": "(?x)\n\n(?:(?<=@param)|(?<=@arg)|(?<=@argument)|(?<=@type)|(?<=@property)|(?<=@prop))\n\n\\s+\n\n({(?:\n \\* | # {*} any type\n \\? | # {?} unknown type\n\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 (?:\n function # {function(string, number)} function type\n \\s*\n \\(\n \\s*\n (?:\n [a-zA-Z_$][\\w$]*\n (?:\n \\s*,\\s*\n [a-zA-Z_$][\\w$]*\n )*\n )?\n \\s*\n \\)\n (?: # {function(): string} function return type\n \\s*:\\s*\n [a-zA-Z_$][\\w$]*\n )?\n )?\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, a string or an array of numbers\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 )\n # Check for suffix\n (?:\\[\\])? # {string[]} type application, an array of strings\n =? # {string=} optional parameter\n )\n)})\n\n\\s+\n\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\n\\s+\n\n(?:-\\s+)? # optional hyphen before the description\n\n((?:(?!\\*\\/).)*) # The type description",
3395
- "captures": {
3396
- "0": {
3397
- "name": "other.meta.jsdoc"
3398
- },
3399
- "1": {
3400
- "name": "entity.name.type.instance.jsdoc"
3401
- },
3402
- "2": {
3403
- "name": "variable.other.jsdoc"
3404
- },
3405
- "3": {
3406
- "name": "other.description.jsdoc"
3407
- }
3408
- }
3409
- },
3410
- {
3411
- "match": "(?x)\n\n({(?:\n \\* | # {*} any type\n \\? | # {?} unknown type\n\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 (?:\n function # {function(string, number)} function type\n \\s*\n \\(\n \\s*\n (?:\n [a-zA-Z_$][\\w$]*\n (?:\n \\s*,\\s*\n [a-zA-Z_$][\\w$]*\n )*\n )?\n \\s*\n \\)\n (?: # {function(): string} function return type\n \\s*:\\s*\n [a-zA-Z_$][\\w$]*\n )?\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 )\n # Check for suffix\n (?:\\[\\])? # {string[]} type application, an array of strings\n =? # {string=} optional parameter\n )\n)})\n\n\\s+\n\n(?:-\\s+)? # optional hyphen before the description\n\n((?:(?!\\*\\/).)*) # The type description",
3412
- "captures": {
3413
- "0": {
3414
- "name": "other.meta.jsdoc"
3415
- },
3416
- "1": {
3417
- "name": "entity.name.type.instance.jsdoc"
3418
- },
3419
- "2": {
3420
- "name": "other.description.jsdoc"
3421
- }
3422
- }
3423
- }
3424
- ]
3425
- },
3426
- "jsx-tag-attributes": {
8
+ "repository": {
9
+ "expression": {
3427
10
  "patterns": [
3428
11
  {
3429
- "include": "#jsx-tag-attribute-name"
3430
- },
3431
- {
3432
- "include": "#jsx-tag-attribute-assignment"
3433
- },
3434
- {
3435
- "include": "#jsx-string-double-quoted"
3436
- },
3437
- {
3438
- "include": "#jsx-string-single-quoted"
3439
- },
3440
- {
3441
- "include": "#jsx-evaluated-code"
12
+ "include": "#jsx"
3442
13
  }
3443
14
  ]
3444
15
  },
3445
- "jsx-tag-attribute-name": {
3446
- "match": "(?x)\n \\s*\n ([_$a-zA-Z][-$\\w]*)\n (?=\\s|=|/?>|/\\*|//)",
3447
- "captures": {
3448
- "1": {
3449
- "name": "entity.other.attribute-name.tsx"
3450
- }
3451
- }
3452
- },
3453
- "jsx-tag-attribute-assignment": {
3454
- "name": "keyword.operator.assignment.tsx",
3455
- "match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))"
3456
- },
3457
- "jsx-string-double-quoted": {
3458
- "name": "string.quoted.double.tsx",
3459
- "begin": "\"",
3460
- "end": "\"",
3461
- "beginCaptures": {
3462
- "0": {
3463
- "name": "punctuation.definition.string.begin.tsx"
3464
- }
3465
- },
3466
- "endCaptures": {
3467
- "0": {
3468
- "name": "punctuation.definition.string.end.tsx"
3469
- }
3470
- },
16
+ "cast": {
3471
17
  "patterns": [
3472
18
  {
3473
- "include": "#jsx-entities"
19
+ "include": "#jsx"
3474
20
  }
3475
21
  ]
3476
22
  },
3477
- "jsx-string-single-quoted": {
3478
- "name": "string.quoted.single.tsx",
3479
- "begin": "'",
3480
- "end": "'",
3481
- "beginCaptures": {
3482
- "0": {
3483
- "name": "punctuation.definition.string.begin.tsx"
3484
- }
3485
- },
3486
- "endCaptures": {
3487
- "0": {
3488
- "name": "punctuation.definition.string.end.tsx"
3489
- }
3490
- },
23
+ "jsx": {
3491
24
  "patterns": [
3492
25
  {
3493
- "include": "#jsx-entities"
3494
- }
3495
- ]
3496
- },
3497
- "jsx-entities": {
3498
- "patterns": [
26
+ "include": "#jsx-tag-without-attributes-in-expression"
27
+ },
3499
28
  {
3500
- "name": "constant.character.entity.tsx",
3501
- "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
3502
- "captures": {
3503
- "1": {
3504
- "name": "punctuation.definition.entity.tsx"
3505
- },
3506
- "3": {
3507
- "name": "punctuation.definition.entity.tsx"
3508
- }
3509
- }
29
+ "include": "#jsx-tag-in-expression"
3510
30
  },
3511
31
  {
3512
- "name": "invalid.illegal.bad-ampersand.tsx",
3513
- "match": "&"
32
+ "include": "#jsx-tag-invalid"
3514
33
  }
3515
34
  ]
3516
35
  },
3517
- "jsx-evaluated-code": {
3518
- "name": "meta.embedded.expression.tsx",
3519
- "begin": "\\{",
3520
- "end": "\\}",
3521
- "beginCaptures": {
3522
- "0": {
3523
- "name": "punctuation.section.embedded.begin.tsx"
3524
- }
3525
- },
3526
- "endCaptures": {
3527
- "0": {
3528
- "name": "punctuation.section.embedded.end.tsx"
3529
- }
3530
- },
36
+ "jsx-tag-without-attributes-in-expression": {
37
+ "begin": "(?x)\n (?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\Wreturn|^return|\\Wdefault|^)\\s*\n (?=(<)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\\s*(>))",
38
+ "end": "(?!\\s*(<)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\\s*(>))",
3531
39
  "patterns": [
3532
40
  {
3533
- "include": "#expression"
41
+ "include": "#jsx-tag-without-attributes"
3534
42
  }
3535
43
  ]
3536
44
  },
3537
- "jsx-tag-attributes-illegal": {
3538
- "name": "invalid.illegal.attribute.tsx",
3539
- "match": "\\S+"
3540
- },
3541
45
  "jsx-tag-without-attributes": {
3542
46
  "name": "meta.tag.without-attributes.tsx",
3543
- "begin": "(<)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>)",
3544
- "end": "(</)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>)",
47
+ "begin": "(<)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\\s*(>)",
48
+ "end": "(</)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\\s*(>)",
3545
49
  "beginCaptures": {
3546
50
  "1": {
3547
51
  "name": "punctuation.definition.tag.begin.tsx"
@@ -3550,6 +54,9 @@
3550
54
  "name": "entity.name.tag.tsx"
3551
55
  },
3552
56
  "3": {
57
+ "name": "support.class.component.tsx"
58
+ },
59
+ "4": {
3553
60
  "name": "punctuation.definition.tag.end.tsx"
3554
61
  }
3555
62
  },
@@ -3561,6 +68,9 @@
3561
68
  "name": "entity.name.tag.tsx"
3562
69
  },
3563
70
  "3": {
71
+ "name": "support.class.component.tsx"
72
+ },
73
+ "4": {
3564
74
  "name": "punctuation.definition.tag.end.tsx"
3565
75
  }
3566
76
  },
@@ -3572,8 +82,8 @@
3572
82
  ]
3573
83
  },
3574
84
  "jsx-tag-in-expression": {
3575
- "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+(?!\\?)|/?>))",
3576
- "end": "(/>)|(?:(</)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>))",
85
+ "begin": "(?x)\n (?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\Wreturn|^return|\\Wdefault|^)\\s*\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
86
+ "end": "(/>)|(?:(</)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\\s*(>))",
3577
87
  "endCaptures": {
3578
88
  "0": {
3579
89
  "name": "meta.tag.tsx"
@@ -3588,6 +98,9 @@
3588
98
  "name": "entity.name.tag.tsx"
3589
99
  },
3590
100
  "4": {
101
+ "name": "support.class.component.tsx"
102
+ },
103
+ "5": {
3591
104
  "name": "punctuation.definition.tag.end.tsx"
3592
105
  }
3593
106
  },
@@ -3599,7 +112,7 @@
3599
112
  },
3600
113
  "jsx-child-tag": {
3601
114
  "begin": "(?x)\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
3602
- "end": "(/>)|(?:(</)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>))",
115
+ "end": "(/>)|(?:(</)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\\s*(>))",
3603
116
  "endCaptures": {
3604
117
  "0": {
3605
118
  "name": "meta.tag.tsx"
@@ -3614,6 +127,9 @@
3614
127
  "name": "entity.name.tag.tsx"
3615
128
  },
3616
129
  "4": {
130
+ "name": "support.class.component.tsx"
131
+ },
132
+ "5": {
3617
133
  "name": "punctuation.definition.tag.end.tsx"
3618
134
  }
3619
135
  },
@@ -3629,16 +145,20 @@
3629
145
  "end": "(?=(/>)|(?:(</)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>)))",
3630
146
  "patterns": [
3631
147
  {
3632
- "begin": "(?x)\n (<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>)",
148
+ "begin": "(?x)\n (<)\\s*\n ((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>)",
3633
149
  "beginCaptures": {
3634
150
  "1": {
3635
151
  "name": "punctuation.definition.tag.begin.tsx"
3636
152
  },
3637
153
  "2": {
3638
154
  "name": "entity.name.tag.tsx"
155
+ },
156
+ "3": {
157
+ "name": "support.class.component.tsx"
3639
158
  }
3640
159
  },
3641
160
  "end": "(?=[/]?>)",
161
+ "contentName": "meta.tag.attributes.tsx",
3642
162
  "patterns": [
3643
163
  {
3644
164
  "include": "#comment"
@@ -3691,18 +211,120 @@
3691
211
  }
3692
212
  ]
3693
213
  },
3694
- "jsx": {
214
+ "jsx-evaluated-code": {
215
+ "name": "meta.embedded.expression.tsx",
216
+ "begin": "\\{",
217
+ "end": "\\}",
218
+ "beginCaptures": {
219
+ "0": {
220
+ "name": "punctuation.section.embedded.begin.tsx"
221
+ }
222
+ },
223
+ "endCaptures": {
224
+ "0": {
225
+ "name": "punctuation.section.embedded.end.tsx"
226
+ }
227
+ },
3695
228
  "patterns": [
3696
229
  {
3697
- "include": "#jsx-tag-without-attributes"
230
+ "include": "#expression"
231
+ }
232
+ ]
233
+ },
234
+ "jsx-entities": {
235
+ "patterns": [
236
+ {
237
+ "name": "constant.character.entity.tsx",
238
+ "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
239
+ "captures": {
240
+ "1": {
241
+ "name": "punctuation.definition.entity.tsx"
242
+ },
243
+ "3": {
244
+ "name": "punctuation.definition.entity.tsx"
245
+ }
246
+ }
3698
247
  },
3699
248
  {
3700
- "include": "#jsx-tag-in-expression"
249
+ "name": "invalid.illegal.bad-ampersand.tsx",
250
+ "match": "&"
251
+ }
252
+ ]
253
+ },
254
+ "jsx-tag-attributes": {
255
+ "patterns": [
256
+ {
257
+ "include": "#jsx-tag-attribute-name"
3701
258
  },
3702
259
  {
3703
- "include": "#jsx-tag-invalid"
260
+ "include": "#jsx-tag-attribute-assignment"
261
+ },
262
+ {
263
+ "include": "#jsx-string-double-quoted"
264
+ },
265
+ {
266
+ "include": "#jsx-string-single-quoted"
267
+ },
268
+ {
269
+ "include": "#jsx-evaluated-code"
270
+ }
271
+ ]
272
+ },
273
+ "jsx-tag-attribute-name": {
274
+ "match": "(?x)\n \\s*\n ([_$a-zA-Z][-$\\w]*)\n (?=\\s|=|/?>|/\\*|//)",
275
+ "captures": {
276
+ "1": {
277
+ "name": "entity.other.attribute-name.tsx"
278
+ }
279
+ }
280
+ },
281
+ "jsx-tag-attribute-assignment": {
282
+ "name": "keyword.operator.assignment.tsx",
283
+ "match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))"
284
+ },
285
+ "jsx-string-double-quoted": {
286
+ "name": "string.quoted.double.tsx",
287
+ "begin": "\"",
288
+ "end": "\"",
289
+ "beginCaptures": {
290
+ "0": {
291
+ "name": "punctuation.definition.string.begin.tsx"
292
+ }
293
+ },
294
+ "endCaptures": {
295
+ "0": {
296
+ "name": "punctuation.definition.string.end.tsx"
297
+ }
298
+ },
299
+ "patterns": [
300
+ {
301
+ "include": "#jsx-entities"
302
+ }
303
+ ]
304
+ },
305
+ "jsx-string-single-quoted": {
306
+ "name": "string.quoted.single.tsx",
307
+ "begin": "'",
308
+ "end": "'",
309
+ "beginCaptures": {
310
+ "0": {
311
+ "name": "punctuation.definition.string.begin.tsx"
312
+ }
313
+ },
314
+ "endCaptures": {
315
+ "0": {
316
+ "name": "punctuation.definition.string.end.tsx"
317
+ }
318
+ },
319
+ "patterns": [
320
+ {
321
+ "include": "#jsx-entities"
3704
322
  }
3705
323
  ]
324
+ },
325
+ "jsx-tag-attributes-illegal": {
326
+ "name": "invalid.illegal.attribute.tsx",
327
+ "match": "\\S+"
3706
328
  }
3707
329
  }
3708
330
  }