github-linguist 5.0.0 → 5.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/bin/git-linguist +10 -2
  3. data/bin/linguist +26 -9
  4. data/grammars/config.xcompose.json +83 -0
  5. data/grammars/hint.haskell.json +21 -30
  6. data/grammars/hint.message.haskell.json +21 -30
  7. data/grammars/hint.type.haskell.json +21 -30
  8. data/grammars/source.bsl.json +42 -28
  9. data/grammars/source.cs.json +656 -131
  10. data/grammars/source.csound-document.json +142 -25
  11. data/grammars/source.csound-score.json +13 -10
  12. data/grammars/source.csound.json +136 -81
  13. data/grammars/source.css.json +1501 -331
  14. data/grammars/source.css.less.json +3 -3
  15. data/grammars/source.d.json +60 -44
  16. data/grammars/source.gn.json +240 -138
  17. data/grammars/source.graphql.json +781 -155
  18. data/grammars/source.haskell.json +21 -30
  19. data/grammars/source.js.json +46 -46
  20. data/grammars/source.mask.json +1 -1
  21. data/grammars/source.perl6fe.json +1151 -763
  22. data/grammars/source.python.json +45 -23
  23. data/grammars/source.quoting.perl6fe.json +2170 -0
  24. data/grammars/source.reason.json +296 -0
  25. data/grammars/source.regexp.perl6fe.json +27 -0
  26. data/grammars/source.rust.json +522 -125
  27. data/grammars/source.sdbl.json +2 -2
  28. data/grammars/source.shell.json +125 -161
  29. data/grammars/source.solidity.json +137 -0
  30. data/grammars/source.ts.json +385 -137
  31. data/grammars/source.tsx.json +394 -167
  32. data/grammars/source.yaml.json +176 -171
  33. data/grammars/text.html.php.blade.json +2 -2
  34. data/grammars/text.tex.latex.haskell.json +1 -10
  35. data/lib/linguist/generated.rb +50 -4
  36. data/lib/linguist/heuristics.rb +1 -1
  37. data/lib/linguist/language.rb +12 -8
  38. data/lib/linguist/languages.json +1 -1
  39. data/lib/linguist/languages.yml +38 -1
  40. data/lib/linguist/samples.json +4605 -581
  41. data/lib/linguist/vendor.yml +6 -0
  42. data/lib/linguist/version.rb +1 -1
  43. metadata +10 -7
  44. data/grammars/source.hy.json +0 -270
@@ -6,8 +6,20 @@
6
6
  ],
7
7
  "uuid": "805375ec-d614-41f5-8993-5843fe63ea82",
8
8
  "patterns": [
9
+ {
10
+ "include": "#directives"
11
+ },
9
12
  {
10
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
+ }
11
23
  }
12
24
  ],
13
25
  "repository": {
@@ -16,9 +28,6 @@
16
28
  {
17
29
  "include": "#string"
18
30
  },
19
- {
20
- "include": "#regex"
21
- },
22
31
  {
23
32
  "include": "#template"
24
33
  },
@@ -85,23 +94,58 @@
85
94
  ]
86
95
  },
87
96
  "var-single-variable": {
88
- "name": "meta.var-single-variable.expr.tsx",
89
- "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
90
- "beginCaptures": {
91
- "1": {
92
- "name": "meta.definition.variable.tsx variable.other.readwrite.tsx"
93
- }
94
- },
95
- "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
96
97
  "patterns": [
97
98
  {
98
- "include": "#type-annotation"
99
+ "name": "meta.var-single-variable.expr.tsx",
100
+ "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n (=\\s*(\n (async\\s+) |\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>) |\n ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>))\n ) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )))\n )\n)",
101
+ "beginCaptures": {
102
+ "1": {
103
+ "name": "meta.definition.variable.tsx entity.name.function.tsx"
104
+ }
105
+ },
106
+ "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
107
+ "patterns": [
108
+ {
109
+ "include": "#type-annotation"
110
+ },
111
+ {
112
+ "include": "#string"
113
+ },
114
+ {
115
+ "include": "#comment"
116
+ }
117
+ ]
99
118
  },
100
119
  {
101
- "include": "#string"
120
+ "name": "meta.var-single-variable.expr.tsx",
121
+ "begin": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
122
+ "beginCaptures": {
123
+ "1": {
124
+ "name": "meta.definition.variable.tsx variable.other.constant.tsx"
125
+ }
126
+ },
127
+ "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))"
102
128
  },
103
129
  {
104
- "include": "#comment"
130
+ "name": "meta.var-single-variable.expr.tsx",
131
+ "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
132
+ "beginCaptures": {
133
+ "1": {
134
+ "name": "meta.definition.variable.tsx variable.other.readwrite.tsx"
135
+ }
136
+ },
137
+ "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
138
+ "patterns": [
139
+ {
140
+ "include": "#type-annotation"
141
+ },
142
+ {
143
+ "include": "#string"
144
+ },
145
+ {
146
+ "include": "#comment"
147
+ }
148
+ ]
105
149
  }
106
150
  ]
107
151
  },
@@ -147,29 +191,14 @@
147
191
  "include": "#comment"
148
192
  },
149
193
  {
150
- "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)",
151
- "beginCaptures": {
152
- "1": {
153
- "name": "variable.object.property.tsx"
154
- },
155
- "2": {
156
- "name": "punctuation.destructuring.tsx"
157
- }
158
- },
194
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
159
195
  "end": "(?=,|\\})",
160
196
  "patterns": [
161
197
  {
162
- "include": "#object-binding-pattern"
163
- },
164
- {
165
- "include": "#array-binding-pattern"
166
- },
167
- {
168
- "name": "meta.definition.variable.tsx variable.other.readwrite.tsx",
169
- "match": "([_$[:alpha:]][_$[:alnum:]]*)"
198
+ "include": "#object-binding-element-propertyName"
170
199
  },
171
200
  {
172
- "include": "#variable-initializer"
201
+ "include": "#binding-element"
173
202
  }
174
203
  ]
175
204
  },
@@ -187,7 +216,28 @@
187
216
  }
188
217
  ]
189
218
  },
190
- "array-binding-element": {
219
+ "object-binding-element-propertyName": {
220
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
221
+ "end": "(:)",
222
+ "endCaptures": {
223
+ "0": {
224
+ "name": "punctuation.destructuring.tsx"
225
+ }
226
+ },
227
+ "patterns": [
228
+ {
229
+ "include": "#string"
230
+ },
231
+ {
232
+ "include": "#array-literal"
233
+ },
234
+ {
235
+ "name": "variable.object.property.tsx",
236
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)"
237
+ }
238
+ ]
239
+ },
240
+ "binding-element": {
191
241
  "patterns": [
192
242
  {
193
243
  "include": "#comment"
@@ -203,9 +253,6 @@
203
253
  },
204
254
  {
205
255
  "include": "#variable-initializer"
206
- },
207
- {
208
- "include": "#punctuation-comma"
209
256
  }
210
257
  ]
211
258
  },
@@ -260,23 +307,14 @@
260
307
  },
261
308
  "patterns": [
262
309
  {
263
- "include": "#array-binding-element"
264
- }
265
- ]
266
- },
267
- "ternary-expression": {
268
- "begin": "(?=\\?)",
269
- "end": "(?=$|[;,})\\]])",
270
- "patterns": [
271
- {
272
- "include": "#ternary-operator"
310
+ "include": "#binding-element"
273
311
  },
274
312
  {
275
- "include": "#expression"
313
+ "include": "#punctuation-comma"
276
314
  }
277
315
  ]
278
316
  },
279
- "ternary-operator": {
317
+ "ternary-expression": {
280
318
  "begin": "(\\?)",
281
319
  "beginCaptures": {
282
320
  "0": {
@@ -341,10 +379,10 @@
341
379
  "include": "#expression-operators"
342
380
  },
343
381
  {
344
- "include": "#support-objects"
382
+ "include": "#function-call"
345
383
  },
346
384
  {
347
- "include": "#function-call"
385
+ "include": "#support-objects"
348
386
  },
349
387
  {
350
388
  "include": "#identifiers"
@@ -549,12 +587,15 @@
549
587
  ]
550
588
  },
551
589
  {
552
- "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")))",
590
+ "begin": "(?=((\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))",
553
591
  "end": "(?=,|\\}|$)",
554
592
  "patterns": [
555
593
  {
556
594
  "include": "#string"
557
595
  },
596
+ {
597
+ "include": "#array-literal"
598
+ },
558
599
  {
559
600
  "include": "#comment"
560
601
  },
@@ -594,8 +635,7 @@
594
635
  "match": "([_$[:alpha:]][_$[:alnum:]]*)"
595
636
  },
596
637
  {
597
- "name": "punctuation.accessor.tsx",
598
- "match": "\\."
638
+ "include": "#punctuation-accessor"
599
639
  }
600
640
  ]
601
641
  },
@@ -802,7 +842,7 @@
802
842
  },
803
843
  {
804
844
  "comment": "(default|*|name) as alias",
805
- "match": "(?x) (?: \\b(default)\\b | (\\*) | ([_$[:alpha:]][_$[:alnum:]]*)) \\s+ (as) \\s+ (?: (\\b default \\b | \\*) | ([_$[:alpha:]][_$[:alnum:]]*))",
845
+ "match": "(?x) (?: \\b(default)\\b | (\\*) | ([_$[:alpha:]][_$[:alnum:]]*)) \\s+ \n (as) \\s+ (?: (\\b default \\b | \\*) | ([_$[:alpha:]][_$[:alnum:]]*))",
806
846
  "captures": {
807
847
  "1": {
808
848
  "name": "keyword.control.default.tsx"
@@ -911,7 +951,7 @@
911
951
  "include": "#type-parameters"
912
952
  },
913
953
  {
914
- "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)",
954
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)(?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)*\\s*([,<{]|extends|implements|//|/\\*))",
915
955
  "captures": {
916
956
  "1": {
917
957
  "name": "entity.name.type.module.tsx"
@@ -922,12 +962,15 @@
922
962
  }
923
963
  },
924
964
  {
925
- "match": "([_$[:alpha:]][_$[:alnum:]]*)",
965
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*([,<{]|extends|implements|//|/\\*))",
926
966
  "captures": {
927
967
  "1": {
928
968
  "name": "entity.other.inherited-class.tsx"
929
969
  }
930
970
  }
971
+ },
972
+ {
973
+ "include": "#expression"
931
974
  }
932
975
  ]
933
976
  },
@@ -1017,6 +1060,9 @@
1017
1060
  {
1018
1061
  "include": "#indexer-declaration"
1019
1062
  },
1063
+ {
1064
+ "include": "#indexer-mapped-type-declaration"
1065
+ },
1020
1066
  {
1021
1067
  "include": "#field-declaration"
1022
1068
  },
@@ -1042,12 +1088,15 @@
1042
1088
  },
1043
1089
  {
1044
1090
  "include": "#punctuation-semicolon"
1091
+ },
1092
+ {
1093
+ "include": "#type"
1045
1094
  }
1046
1095
  ]
1047
1096
  },
1048
1097
  "field-declaration": {
1049
1098
  "name": "meta.field.declaration.tsx",
1050
- "begin": "(?<!\\()(?:(?<!\\.|\\$)\\b(readonly)\\s+)?(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[[^\\]]*\\]))\\s*(\\?\\s*)?(=|:))",
1099
+ "begin": "(?<!\\()(?:(?<!\\.|\\$)\\b(readonly)\\s+)?(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
1051
1100
  "beginCaptures": {
1052
1101
  "1": {
1053
1102
  "name": "storage.modifier.tsx"
@@ -1059,7 +1108,7 @@
1059
1108
  "include": "#variable-initializer"
1060
1109
  },
1061
1110
  {
1062
- "begin": "(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(\\[[^\\]]*\\]))\\s*(\\?\\s*)?(=|:))",
1111
+ "begin": "(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
1063
1112
  "end": "(?=[};,=]|$)|(?<=\\})",
1064
1113
  "patterns": [
1065
1114
  {
@@ -1074,6 +1123,10 @@
1074
1123
  {
1075
1124
  "include": "#comment"
1076
1125
  },
1126
+ {
1127
+ "name": "meta.definition.property.tsx entity.name.function.tsx",
1128
+ "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n (=\\s*(\n (async\\s+) |\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>) |\n ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>))\n ) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )))\n )\n)"
1129
+ },
1077
1130
  {
1078
1131
  "name": "meta.definition.property.tsx variable.object.property.tsx",
1079
1132
  "match": "[_$[:alpha:]][_$[:alnum:]]*"
@@ -1088,7 +1141,7 @@
1088
1141
  },
1089
1142
  "method-declaration": {
1090
1143
  "name": "meta.method.declaration.tsx",
1091
- "begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[[^\\]]*\\]))\\s*(\\??))?\\s*[\\(\\<]))",
1144
+ "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*[\\(\\<]))",
1092
1145
  "beginCaptures": {
1093
1146
  "1": {
1094
1147
  "name": "storage.modifier.tsx"
@@ -1138,7 +1191,7 @@
1138
1191
  ]
1139
1192
  },
1140
1193
  "method-overload-declaration": {
1141
- "begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[[^\\]]*\\]))\\s*(\\??))?\\s*[\\(\\<]))",
1194
+ "begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))?\\s*[\\(\\<]))",
1142
1195
  "beginCaptures": {
1143
1196
  "1": {
1144
1197
  "name": "storage.modifier.tsx"
@@ -1170,7 +1223,7 @@
1170
1223
  ]
1171
1224
  },
1172
1225
  "method-declaration-name": {
1173
- "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[[^\\]]*\\]))\\s*(\\??)\\s*[\\(\\<])",
1226
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\<])",
1174
1227
  "end": "(?=\\(|\\<)",
1175
1228
  "patterns": [
1176
1229
  {
@@ -1189,6 +1242,65 @@
1189
1242
  }
1190
1243
  ]
1191
1244
  },
1245
+ "object-literal-method-declaration": {
1246
+ "name": "meta.method.declaration.tsx",
1247
+ "begin": "(?<!\\.|\\$)(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))?\\s*[\\(\\<])",
1248
+ "beginCaptures": {
1249
+ "1": {
1250
+ "name": "storage.modifier.async.tsx"
1251
+ },
1252
+ "2": {
1253
+ "name": "storage.type.property.tsx"
1254
+ },
1255
+ "3": {
1256
+ "name": "keyword.generator.asterisk.tsx"
1257
+ }
1258
+ },
1259
+ "end": "(?=\\}|;|,)|(?<=\\})",
1260
+ "patterns": [
1261
+ {
1262
+ "include": "#method-declaration-name"
1263
+ },
1264
+ {
1265
+ "include": "#comment"
1266
+ },
1267
+ {
1268
+ "include": "#type-parameters"
1269
+ },
1270
+ {
1271
+ "include": "#function-parameters"
1272
+ },
1273
+ {
1274
+ "include": "#return-type"
1275
+ },
1276
+ {
1277
+ "include": "#method-overload-declaration"
1278
+ },
1279
+ {
1280
+ "include": "#decl-block"
1281
+ }
1282
+ ]
1283
+ },
1284
+ "object-literal-method-overload-declaration": {
1285
+ "begin": "(?<!\\.|\\$)(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))?\\s*[\\(\\<])",
1286
+ "beginCaptures": {
1287
+ "1": {
1288
+ "name": "storage.modifier.async.tsx"
1289
+ },
1290
+ "2": {
1291
+ "name": "storage.type.property.tsx"
1292
+ },
1293
+ "3": {
1294
+ "name": "keyword.generator.asterisk.tsx"
1295
+ }
1296
+ },
1297
+ "end": "(?=\\(|\\<)",
1298
+ "patterns": [
1299
+ {
1300
+ "include": "#method-declaration-name"
1301
+ }
1302
+ ]
1303
+ },
1192
1304
  "indexer-declaration": {
1193
1305
  "name": "meta.indexer.declaration.tsx",
1194
1306
  "begin": "(?:(?<!\\.|\\$)\\b(readonly)\\s*)?(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)",
@@ -1218,6 +1330,38 @@
1218
1330
  }
1219
1331
  ]
1220
1332
  },
1333
+ "indexer-mapped-type-declaration": {
1334
+ "name": "meta.indexer.mappedtype.declaration.tsx",
1335
+ "begin": "(?:(?<!\\.|\\$)\\b(readonly)\\s*)?(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s+(in)\\s+",
1336
+ "beginCaptures": {
1337
+ "1": {
1338
+ "name": "storage.modifier.tsx"
1339
+ },
1340
+ "2": {
1341
+ "name": "meta.brace.square.tsx"
1342
+ },
1343
+ "3": {
1344
+ "name": "entity.name.type.tsx"
1345
+ },
1346
+ "4": {
1347
+ "name": "keyword.operator.expression.in.tsx"
1348
+ }
1349
+ },
1350
+ "end": "(\\])\\s*(\\?\\s*)?|$",
1351
+ "endCaptures": {
1352
+ "1": {
1353
+ "name": "meta.brace.square.tsx"
1354
+ },
1355
+ "2": {
1356
+ "name": "keyword.operator.optional.tsx"
1357
+ }
1358
+ },
1359
+ "patterns": [
1360
+ {
1361
+ "include": "#type"
1362
+ }
1363
+ ]
1364
+ },
1221
1365
  "function-declaration": {
1222
1366
  "name": "meta.function.tsx",
1223
1367
  "begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
@@ -1342,24 +1486,50 @@
1342
1486
  ]
1343
1487
  },
1344
1488
  "parameter-name": {
1345
- "match": "(?:\\s*\\b(readonly)\\s+)?(?:\\s*\\b(public|private|protected)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\??)",
1346
- "captures": {
1347
- "1": {
1348
- "name": "storage.modifier.tsx"
1349
- },
1350
- "2": {
1351
- "name": "storage.modifier.tsx"
1352
- },
1353
- "3": {
1354
- "name": "keyword.operator.rest.tsx"
1489
+ "patterns": [
1490
+ {
1491
+ "match": "\\s*\\b(public|protected|private|readonly)(?=\\s+(public|protected|private|readonly)\\s+)",
1492
+ "captures": {
1493
+ "1": {
1494
+ "name": "storage.modifier.tsx"
1495
+ }
1496
+ }
1355
1497
  },
1356
- "4": {
1357
- "name": "variable.parameter.tsx"
1498
+ {
1499
+ "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*:\\s*(.)*)?\\s*=>))\n ) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )))\n )\n)",
1500
+ "captures": {
1501
+ "1": {
1502
+ "name": "storage.modifier.tsx"
1503
+ },
1504
+ "2": {
1505
+ "name": "keyword.operator.rest.tsx"
1506
+ },
1507
+ "3": {
1508
+ "name": "entity.name.function.tsx"
1509
+ },
1510
+ "4": {
1511
+ "name": "keyword.operator.optional.tsx"
1512
+ }
1513
+ }
1358
1514
  },
1359
- "5": {
1360
- "name": "keyword.operator.optional.tsx"
1515
+ {
1516
+ "match": "(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\??)",
1517
+ "captures": {
1518
+ "1": {
1519
+ "name": "storage.modifier.tsx"
1520
+ },
1521
+ "2": {
1522
+ "name": "keyword.operator.rest.tsx"
1523
+ },
1524
+ "3": {
1525
+ "name": "variable.parameter.tsx"
1526
+ },
1527
+ "4": {
1528
+ "name": "keyword.operator.optional.tsx"
1529
+ }
1530
+ }
1361
1531
  }
1362
- }
1532
+ ]
1363
1533
  },
1364
1534
  "destructuring-parameter": {
1365
1535
  "patterns": [
@@ -1399,7 +1569,10 @@
1399
1569
  },
1400
1570
  "patterns": [
1401
1571
  {
1402
- "include": "#parameter-array-binding-element"
1572
+ "include": "#parameter-binding-element"
1573
+ },
1574
+ {
1575
+ "include": "#punctuation-comma"
1403
1576
  }
1404
1577
  ]
1405
1578
  }
@@ -1411,29 +1584,14 @@
1411
1584
  "include": "#comment"
1412
1585
  },
1413
1586
  {
1414
- "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)",
1415
- "beginCaptures": {
1416
- "1": {
1417
- "name": "variable.object.property.tsx"
1418
- },
1419
- "2": {
1420
- "name": "punctuation.destructuring.tsx"
1421
- }
1422
- },
1587
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
1423
1588
  "end": "(?=,|\\})",
1424
1589
  "patterns": [
1425
1590
  {
1426
- "include": "#parameter-object-binding-pattern"
1427
- },
1428
- {
1429
- "include": "#parameter-array-binding-pattern"
1430
- },
1431
- {
1432
- "name": "variable.parameter.tsx",
1433
- "match": "([_$[:alpha:]][_$[:alnum:]]*)"
1591
+ "include": "#object-binding-element-propertyName"
1434
1592
  },
1435
1593
  {
1436
- "include": "#variable-initializer"
1594
+ "include": "#parameter-binding-element"
1437
1595
  }
1438
1596
  ]
1439
1597
  },
@@ -1451,7 +1609,7 @@
1451
1609
  }
1452
1610
  ]
1453
1611
  },
1454
- "parameter-array-binding-element": {
1612
+ "parameter-binding-element": {
1455
1613
  "patterns": [
1456
1614
  {
1457
1615
  "include": "#comment"
@@ -1467,9 +1625,6 @@
1467
1625
  },
1468
1626
  {
1469
1627
  "include": "#variable-initializer"
1470
- },
1471
- {
1472
- "include": "#punctuation-comma"
1473
1628
  }
1474
1629
  ]
1475
1630
  },
@@ -1524,7 +1679,10 @@
1524
1679
  },
1525
1680
  "patterns": [
1526
1681
  {
1527
- "include": "#parameter-array-binding-element"
1682
+ "include": "#parameter-binding-element"
1683
+ },
1684
+ {
1685
+ "include": "#punctuation-comma"
1528
1686
  }
1529
1687
  ]
1530
1688
  },
@@ -1684,9 +1842,9 @@
1684
1842
  },
1685
1843
  "type-paren-or-function-parameters": {
1686
1844
  "name": "meta.type.paren.cover.tsx",
1687
- "begin": "\\s*(\\()",
1845
+ "begin": "\\(",
1688
1846
  "beginCaptures": {
1689
- "1": {
1847
+ "0": {
1690
1848
  "name": "meta.brace.round.tsx"
1691
1849
  }
1692
1850
  },
@@ -1743,7 +1901,7 @@
1743
1901
  },
1744
1902
  {
1745
1903
  "name": "meta.type.function.tsx",
1746
- "begin": "(?x)( \\s* (?= [(]\\s*( ([)]) | (\\.\\.\\.) | ([_$[:alnum:]]+\\s*( ([:,?=])| ([)]\\s*=>) )) ) ) )",
1904
+ "begin": "(?x)(\n (?=\n [(]\\s*(\n ([)]) | \n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )\n )\n)",
1747
1905
  "end": "(?<=\\))",
1748
1906
  "patterns": [
1749
1907
  {
@@ -1761,6 +1919,10 @@
1761
1919
  {
1762
1920
  "name": "keyword.operator.type.tsx",
1763
1921
  "match": "[&|]"
1922
+ },
1923
+ {
1924
+ "name": "keyword.operator.expression.keyof.tsx",
1925
+ "match": "(?<!\\.|\\$)\\bkeyof\\b(?!\\$)"
1764
1926
  }
1765
1927
  ]
1766
1928
  },
@@ -1892,12 +2054,15 @@
1892
2054
  ]
1893
2055
  },
1894
2056
  "for-loop": {
1895
- "begin": "(?<!\\.|\\$)\\b(for)\\s*(\\()",
2057
+ "begin": "(?<!\\.|\\$)\\b(for)(?:\\s+(await))?\\s*(\\()",
1896
2058
  "beginCaptures": {
1897
2059
  "1": {
1898
2060
  "name": "keyword.control.loop.tsx"
1899
2061
  },
1900
2062
  "2": {
2063
+ "name": "keyword.control.loop.tsx"
2064
+ },
2065
+ "3": {
1901
2066
  "name": "meta.brace.round.tsx"
1902
2067
  }
1903
2068
  },
@@ -1944,7 +2109,7 @@
1944
2109
  },
1945
2110
  "switch-block": {
1946
2111
  "name": "switch-block.expr.tsx",
1947
- "begin": "{",
2112
+ "begin": "\\{",
1948
2113
  "beginCaptures": {
1949
2114
  "0": {
1950
2115
  "name": "punctuation.definition.block.tsx"
@@ -1983,7 +2148,7 @@
1983
2148
  "switch-statement": {
1984
2149
  "name": "switch-statement.expr.tsx",
1985
2150
  "begin": "(?<!\\.|\\$)(?=\\bswitch\\s*\\()",
1986
- "end": "}",
2151
+ "end": "\\}",
1987
2152
  "endCaptures": {
1988
2153
  "0": {
1989
2154
  "name": "punctuation.definition.block.tsx"
@@ -2006,7 +2171,7 @@
2006
2171
  },
2007
2172
  {
2008
2173
  "name": "support.class.builtin.tsx",
2009
- "match": "(?x)(?<!\\.|\\$)\\b(Array|ArrayBuffer|Atomics|Boolean|DataView|Date|Float32Array|Float64Array|Function|Generator |GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Promise|Proxy |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\\b(?!\\$)"
2174
+ "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(?!\\$)"
2010
2175
  },
2011
2176
  {
2012
2177
  "name": "support.class.error.tsx",
@@ -2014,7 +2179,7 @@
2014
2179
  },
2015
2180
  {
2016
2181
  "name": "support.function.tsx",
2017
- "match": "(?x)(?<!\\.|\\$)\\b(clear(Interval|Timeout)|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval| isFinite|isNaN|parseFloat|parseInt|require|set(Interval|Timeout)|super|unescape|uneval)(?=\\s*\\()"
2182
+ "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*\\() "
2018
2183
  },
2019
2184
  {
2020
2185
  "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(?!\\$)",
@@ -2166,17 +2331,19 @@
2166
2331
  ]
2167
2332
  },
2168
2333
  "function-call": {
2169
- "begin": "(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
2170
- "beginCaptures": {
2171
- "1": {
2172
- "name": "punctuation.accessor.tsx"
2173
- },
2174
- "2": {
2175
- "name": "entity.name.function.tsx"
2176
- }
2177
- },
2178
- "end": "(?<=\\))",
2334
+ "begin": "(?=(\\.\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
2335
+ "end": "(?<=\\))(?!(\\.\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
2179
2336
  "patterns": [
2337
+ {
2338
+ "include": "#support-objects"
2339
+ },
2340
+ {
2341
+ "include": "#punctuation-accessor"
2342
+ },
2343
+ {
2344
+ "name": "entity.name.function.tsx",
2345
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)"
2346
+ },
2180
2347
  {
2181
2348
  "include": "#comment"
2182
2349
  },
@@ -2221,7 +2388,7 @@
2221
2388
  "name": "punctuation.accessor.tsx"
2222
2389
  },
2223
2390
  "2": {
2224
- "name": "constant.other.object.property.tsx"
2391
+ "name": "variable.other.constant.object.property.tsx"
2225
2392
  },
2226
2393
  "3": {
2227
2394
  "name": "variable.other.object.property.tsx"
@@ -2229,7 +2396,7 @@
2229
2396
  }
2230
2397
  },
2231
2398
  {
2232
- "match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*( (async\\s+)|(function\\s+)| ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)| ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)))",
2399
+ "match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n (async\\s+)|(function\\s*[(<])|(function\\s+)|\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)|\n ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)))",
2233
2400
  "captures": {
2234
2401
  "1": {
2235
2402
  "name": "punctuation.accessor.tsx"
@@ -2246,7 +2413,7 @@
2246
2413
  "name": "punctuation.accessor.tsx"
2247
2414
  },
2248
2415
  "2": {
2249
- "name": "constant.other.property.tsx"
2416
+ "name": "variable.other.constant.property.tsx"
2250
2417
  }
2251
2418
  }
2252
2419
  },
@@ -2265,7 +2432,7 @@
2265
2432
  "match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
2266
2433
  "captures": {
2267
2434
  "1": {
2268
- "name": "constant.other.object.tsx"
2435
+ "name": "variable.other.constant.object.tsx"
2269
2436
  },
2270
2437
  "2": {
2271
2438
  "name": "variable.other.object.tsx"
@@ -2273,7 +2440,7 @@
2273
2440
  }
2274
2441
  },
2275
2442
  {
2276
- "name": "constant.other.tsx",
2443
+ "name": "variable.other.constant.tsx",
2277
2444
  "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
2278
2445
  },
2279
2446
  {
@@ -2302,6 +2469,9 @@
2302
2469
  {
2303
2470
  "include": "#paren-expression"
2304
2471
  },
2472
+ {
2473
+ "include": "#class-or-interface-declaration"
2474
+ },
2305
2475
  {
2306
2476
  "include": "#type"
2307
2477
  }
@@ -2313,16 +2483,16 @@
2313
2483
  "include": "#comment"
2314
2484
  },
2315
2485
  {
2316
- "include": "#method-declaration"
2486
+ "include": "#object-literal-method-declaration"
2317
2487
  },
2318
2488
  {
2319
2489
  "name": "meta.object.member.tsx",
2320
- "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[[^\\]]*\\]))\\s*:)",
2490
+ "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)",
2321
2491
  "end": "(?=,|\\})",
2322
2492
  "patterns": [
2323
2493
  {
2324
2494
  "name": "meta.object-literal.key.tsx",
2325
- "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[[^\\]]*\\]))\\s*:)",
2495
+ "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)",
2326
2496
  "end": ":",
2327
2497
  "endCaptures": {
2328
2498
  "0": {
@@ -2345,7 +2515,7 @@
2345
2515
  },
2346
2516
  {
2347
2517
  "name": "meta.object.member.tsx",
2348
- "begin": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)(?=\\s*( (async\\s+)|(function\\s+)| ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)| ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>))))",
2518
+ "begin": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)(?=\\s*(\n (async\\s+)|(function\\s*[(<])|(function\\s+)|\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)|\n ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>))))",
2349
2519
  "beginCaptures": {
2350
2520
  "0": {
2351
2521
  "name": "meta.object-literal.key.tsx"
@@ -2505,6 +2675,14 @@
2505
2675
  {
2506
2676
  "name": "keyword.operator.arithmetic.tsx",
2507
2677
  "match": "%|\\*|/|-|\\+"
2678
+ },
2679
+ {
2680
+ "match": "(?<=[_$[:alnum:])])\\s*(/)(?![/*])",
2681
+ "captures": {
2682
+ "1": {
2683
+ "name": "keyword.operator.arithmetic.tsx"
2684
+ }
2685
+ }
2508
2686
  }
2509
2687
  ]
2510
2688
  },
@@ -2676,7 +2854,7 @@
2676
2854
  "patterns": [
2677
2855
  {
2678
2856
  "name": "string.regex.tsx",
2679
- "begin": "(?<=[=(:,\\[?+!]|return|case|=>|&&|\\|\\||\\*\\/)\\s*(/)(?![/*+?])(?=.*/)",
2857
+ "begin": "(?<=[=(:,\\[?+!]|return|case|=>|&&|\\|\\||\\*\\/)\\s*(/)(?![/*])(?=(?:[^/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+/(?![/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))",
2680
2858
  "beginCaptures": {
2681
2859
  "1": {
2682
2860
  "name": "punctuation.definition.string.begin.tsx"
@@ -2699,7 +2877,7 @@
2699
2877
  },
2700
2878
  {
2701
2879
  "name": "string.regex.tsx",
2702
- "begin": "/(?![/*])(?=(?:[^/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+/(?![/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))",
2880
+ "begin": "(?<![_$[:alnum:]])/(?![/*])(?=(?:[^/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+/(?![/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))",
2703
2881
  "beginCaptures": {
2704
2882
  "0": {
2705
2883
  "name": "punctuation.definition.string.begin.tsx"
@@ -2865,7 +3043,6 @@
2865
3043
  ]
2866
3044
  },
2867
3045
  "string": {
2868
- "name": "string.tsx",
2869
3046
  "patterns": [
2870
3047
  {
2871
3048
  "include": "#qstring-single"
@@ -3072,8 +3249,13 @@
3072
3249
  {
3073
3250
  "name": "comment.block.documentation.tsx",
3074
3251
  "begin": "/\\*\\*(?!/)",
3252
+ "beginCaptures": {
3253
+ "0": {
3254
+ "name": "punctuation.definition.comment.tsx"
3255
+ }
3256
+ },
3075
3257
  "end": "\\*/",
3076
- "captures": {
3258
+ "endCaptures": {
3077
3259
  "0": {
3078
3260
  "name": "punctuation.definition.comment.tsx"
3079
3261
  }
@@ -3087,8 +3269,13 @@
3087
3269
  {
3088
3270
  "name": "comment.block.tsx",
3089
3271
  "begin": "/\\*",
3272
+ "beginCaptures": {
3273
+ "0": {
3274
+ "name": "punctuation.definition.comment.tsx"
3275
+ }
3276
+ },
3090
3277
  "end": "\\*/",
3091
- "captures": {
3278
+ "endCaptures": {
3092
3279
  "0": {
3093
3280
  "name": "punctuation.definition.comment.tsx"
3094
3281
  }
@@ -3117,14 +3304,75 @@
3117
3304
  }
3118
3305
  ]
3119
3306
  },
3307
+ "directives": {
3308
+ "name": "comment.line.triple-slash.directive.tsx",
3309
+ "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|name)\\s*=\\s*((\\'[^']*\\')|(\\\"[^\"]*\\\")))+\\s*/>\\s*$)",
3310
+ "beginCaptures": {
3311
+ "1": {
3312
+ "name": "punctuation.definition.comment.tsx"
3313
+ }
3314
+ },
3315
+ "end": "(?=$)",
3316
+ "patterns": [
3317
+ {
3318
+ "name": "meta.tag.tsx",
3319
+ "begin": "(<)(reference|amd-dependency|amd-module)",
3320
+ "beginCaptures": {
3321
+ "1": {
3322
+ "name": "punctuation.definition.tag.directive.tsx"
3323
+ },
3324
+ "2": {
3325
+ "name": "entity.name.tag.directive.tsx"
3326
+ }
3327
+ },
3328
+ "end": "/>",
3329
+ "endCaptures": {
3330
+ "0": {
3331
+ "name": "punctuation.definition.tag.directive.tsx"
3332
+ }
3333
+ },
3334
+ "patterns": [
3335
+ {
3336
+ "name": "entity.other.attribute-name.directive.tsx",
3337
+ "match": "path|types|no-default-lib|name"
3338
+ },
3339
+ {
3340
+ "name": "keyword.operator.assignment.tsx",
3341
+ "match": "="
3342
+ },
3343
+ {
3344
+ "include": "#string"
3345
+ }
3346
+ ]
3347
+ }
3348
+ ]
3349
+ },
3120
3350
  "docblock": {
3121
3351
  "patterns": [
3122
3352
  {
3123
3353
  "name": "storage.type.class.jsdoc",
3124
- "match": "(?<!\\w)@(abstract|access|alias|arg|argument|async|attribute|augments|author|beta|borrows|bubbes|callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright|default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exports?|extends|extension|extension_for|extensionfor|external|file|fileoverview|final|fires|for|function|global|host|ignore|implements|inherit[Dd]oc|inner|instance|interface|kind|lends|license|listens|main|member|memberof|method|mixex|mixins?|module|name|namespace|nocollapse|nosideeffects|override|overview|package|param|preserve|private|prop|property|protected|public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation|version|virtual|writeOnce)\\b"
3354
+ "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"
3355
+ },
3356
+ {
3357
+ "name": "other.meta.jsdoc",
3358
+ "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)",
3359
+ "captures": {
3360
+ "0": {
3361
+ "name": "entity.name.type.instance.jsdoc"
3362
+ },
3363
+ "1": {
3364
+ "name": "constant.other.description.jsdoc"
3365
+ },
3366
+ "2": {
3367
+ "name": "storage.type.class.jsdoc"
3368
+ },
3369
+ "3": {
3370
+ "name": "variable.other.description.jsdoc"
3371
+ }
3372
+ }
3125
3373
  },
3126
3374
  {
3127
- "match": "(?x)\n(?:(?<=@param)|(?<=@arg)|(?<=@argument)|(?<=@type))\n\\s+\n({(?:\n \\* | # {*} any type\n \\? | # {?} unknown type\n (?: # Check for a prefix\n \\? | # {?string} nullable type\n ! | # {!string} non-nullable type\n \\.{3} # {...string} variable number of parameters\n )?\n (?:\n \\( # Opening bracket of multiple types with parenthesis {(string|number)}\n [a-zA-Z_$]+\n (?:\n (?:\n [\\w$]*\n (?:\\[\\])? # {(string[]|number)} type application, an array of strings or a number\n ) |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n (?:\n [\\w$]*\n (?:\\[\\])? # {(string|number[])} type application, a string or an array of numbers\n ) |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n \\) |\n [a-zA-Z_$]+\n (?:\n (?:\n [\\w$]*\n (?:\\[\\])? # {string[]|number} type application, an array of strings or a number\n ) |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n )\n # Check for suffix\n (?:\\[\\])? # {string[]} type application, an array of strings\n =? # {string=} optional parameter\n)})\n\\s+\n(\n \\[ # [foo] optional parameter\n \\s*\n (?:\n [a-zA-Z_$][\\w$]*\n (?:\n (?:\\[\\])? # Foo[].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [a-zA-Z_$][\\w$]*\n )*\n (?:\n \\s*\n = # [foo=bar] Default parameter value\n \\s*\n [\\w$\\s]*\n )?\n )\n \\s*\n \\] |\n (?:\n [a-zA-Z_$][\\w$]*\n (?:\n (?:\\[\\])? # Foo[].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [a-zA-Z_$][\\w$]*\n )*\n )?\n)\n\\s+\n(?:-\\s+)? # optional hyphen before the description\n((?:(?!\\*\\/).)*) # The type description",
3375
+ "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",
3128
3376
  "captures": {
3129
3377
  "0": {
3130
3378
  "name": "other.meta.jsdoc"
@@ -3141,7 +3389,7 @@
3141
3389
  }
3142
3390
  },
3143
3391
  {
3144
- "match": "(?x)\n({(?:\n \\* | # {*} any type\n \\? | # {?} unknown type\n\n (?: # Check for a prefix\n \\? | # {?string} nullable type\n ! | # {!string} non-nullable type\n \\.{3} # {...string} variable number of parameters\n )?\n\n (?:\n \\( # Opening bracket of multiple types with parenthesis {(string|number)}\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n \\) |\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n )\n # Check for suffix\n (?:\\[\\])? # {string[]} type application, an array of strings\n =? # {string=} optional parameter\n)})\n\\s+\n(?:-\\s+)? # optional hyphen before the description\n((?:(?!\\*\\/).)*) # The type description",
3392
+ "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",
3145
3393
  "captures": {
3146
3394
  "0": {
3147
3395
  "name": "other.meta.jsdoc"
@@ -3176,7 +3424,6 @@
3176
3424
  ]
3177
3425
  },
3178
3426
  "jsx-tag-attribute-name": {
3179
- "name": "meta.tag.attribute-name.tsx",
3180
3427
  "match": "(?x)\n \\s*\n ([_$a-zA-Z][-$\\w]*)\n (?=\\s|=|/?>|/\\*|//)",
3181
3428
  "captures": {
3182
3429
  "1": {
@@ -3189,42 +3436,42 @@
3189
3436
  "match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))"
3190
3437
  },
3191
3438
  "jsx-string-double-quoted": {
3192
- "name": "string.jsxAttributeValue.quoted.double.tsx",
3439
+ "name": "string.quoted.double.tsx",
3193
3440
  "begin": "\"",
3194
3441
  "end": "\"",
3195
3442
  "beginCaptures": {
3196
3443
  "0": {
3197
- "name": "punctuation.definition.string.jsxAttributeValue.begin.tsx"
3444
+ "name": "punctuation.definition.string.begin.tsx"
3198
3445
  }
3199
3446
  },
3200
3447
  "endCaptures": {
3201
3448
  "0": {
3202
- "name": "punctuation.definition.string.jsxAttributeValue.end.tsx"
3449
+ "name": "punctuation.definition.string.end.tsx"
3203
3450
  }
3204
3451
  },
3205
3452
  "patterns": [
3206
3453
  {
3207
- "include": "#jsx-attributeValue-entities"
3454
+ "include": "#jsx-entities"
3208
3455
  }
3209
3456
  ]
3210
3457
  },
3211
3458
  "jsx-string-single-quoted": {
3212
- "name": "string.jsxAttributeValue.quoted.single.tsx",
3459
+ "name": "string.quoted.single.tsx",
3213
3460
  "begin": "'",
3214
3461
  "end": "'",
3215
3462
  "beginCaptures": {
3216
3463
  "0": {
3217
- "name": "punctuation.definition.string.jsxAttributeValue.begin.tsx"
3464
+ "name": "punctuation.definition.string.begin.tsx"
3218
3465
  }
3219
3466
  },
3220
3467
  "endCaptures": {
3221
3468
  "0": {
3222
- "name": "punctuation.definition.string.jsxAttributeValue.end.tsx"
3469
+ "name": "punctuation.definition.string.end.tsx"
3223
3470
  }
3224
3471
  },
3225
3472
  "patterns": [
3226
3473
  {
3227
- "include": "#jsx-attributeValue-entities"
3474
+ "include": "#jsx-entities"
3228
3475
  }
3229
3476
  ]
3230
3477
  },
@@ -3248,30 +3495,10 @@
3248
3495
  }
3249
3496
  ]
3250
3497
  },
3251
- "jsx-attributeValue-entities": {
3252
- "patterns": [
3253
- {
3254
- "name": "constant.character.entity.jsxAttributeValue.tsx",
3255
- "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
3256
- "captures": {
3257
- "1": {
3258
- "name": "punctuation.definition.entity.jsxAttributeValue.tsx"
3259
- },
3260
- "3": {
3261
- "name": "punctuation.definition.entity.jsxAttributeValue.tsx"
3262
- }
3263
- }
3264
- },
3265
- {
3266
- "name": "invalid.illegal.bad-ampersand.jsxAttributeValue.tsx",
3267
- "match": "&"
3268
- }
3269
- ]
3270
- },
3271
3498
  "jsx-evaluated-code": {
3272
3499
  "name": "meta.embedded.expression.tsx",
3273
- "begin": "{",
3274
- "end": "}",
3500
+ "begin": "\\{",
3501
+ "end": "\\}",
3275
3502
  "beginCaptures": {
3276
3503
  "0": {
3277
3504
  "name": "punctuation.section.embedded.begin.tsx"
@@ -3326,7 +3553,7 @@
3326
3553
  ]
3327
3554
  },
3328
3555
  "jsx-tag-in-expression": {
3329
- "begin": "(?x)\n (?<=[({\\[,?=>]|&&|\\|\\||\\?|\\Wreturn|^return|\\Wdefault|^)\\s*\n (?!(<)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>)) #look ahead is not start of tag without attributes\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
3556
+ "begin": "(?x)\n (?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\Wreturn|^return|\\Wdefault|^)\\s*\n (?!(<)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>)) #look ahead is not start of tag without attributes\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
3330
3557
  "end": "(/>)|(?:(</)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>))",
3331
3558
  "endCaptures": {
3332
3559
  "0": {