github-linguist 5.0.8 → 5.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/linguist +1 -1
- data/grammars/source.assembly.json +2 -1
- data/grammars/source.clean.json +1 -1
- data/grammars/source.clojure.json +13 -3
- data/grammars/source.coffee.json +2 -2
- data/grammars/source.csound-document.json +1 -2
- data/grammars/source.csound.json +1 -1
- data/grammars/source.css.json +7 -7
- data/grammars/source.ditroff.json +5 -5
- data/grammars/source.elixir.json +2 -2
- data/grammars/source.gfm.json +31 -3
- data/grammars/source.harbour.json +21 -51
- data/grammars/source.jison.json +16 -16
- data/grammars/source.jisonlex.json +6 -6
- data/grammars/source.jolie.json +138 -0
- data/grammars/source.nim.json +20 -5
- data/grammars/source.perl6fe.json +3 -3
- data/grammars/source.python.json +23 -23
- data/grammars/source.renpy.json +2 -2
- data/grammars/source.solidity.json +2 -2
- data/grammars/source.sqf.json +1 -1
- data/grammars/source.terraform.json +78 -25
- data/grammars/source.ts.json +176 -157
- data/grammars/source.tsx.json +176 -157
- data/grammars/source.yaml.json +5 -4
- data/grammars/text.html.basic.json +212 -60
- data/grammars/text.html.ecr.json +1 -1
- data/grammars/text.html.php.blade.json +607 -264
- data/grammars/text.html.php.json +18 -14
- data/grammars/text.html.vue.json +10 -10
- data/grammars/text.marko.json +13 -2
- data/grammars/{source.gfm.clean.json → text.restructuredtext.clean.json} +4 -5
- data/grammars/text.restructuredtext.json +4 -3
- data/grammars/text.roff.json +390 -23
- data/grammars/text.tex.latex.json +1 -1
- data/lib/linguist.rb +1 -1
- data/lib/linguist/heuristics.rb +27 -18
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +39 -2
- data/lib/linguist/samples.json +1999 -737
- data/lib/linguist/version.rb +1 -1
- metadata +5 -4
data/grammars/source.tsx.json
CHANGED
@@ -34,9 +34,6 @@
|
|
34
34
|
{
|
35
35
|
"include": "#comment"
|
36
36
|
},
|
37
|
-
{
|
38
|
-
"include": "#literal"
|
39
|
-
},
|
40
37
|
{
|
41
38
|
"include": "#declaration"
|
42
39
|
},
|
@@ -97,7 +94,7 @@
|
|
97
94
|
"patterns": [
|
98
95
|
{
|
99
96
|
"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)",
|
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)",
|
101
98
|
"beginCaptures": {
|
102
99
|
"1": {
|
103
100
|
"name": "meta.definition.variable.tsx entity.name.function.tsx"
|
@@ -106,13 +103,7 @@
|
|
106
103
|
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
|
107
104
|
"patterns": [
|
108
105
|
{
|
109
|
-
"include": "#type-annotation"
|
110
|
-
},
|
111
|
-
{
|
112
|
-
"include": "#string"
|
113
|
-
},
|
114
|
-
{
|
115
|
-
"include": "#comment"
|
106
|
+
"include": "#var-single-variable-type-annotation"
|
116
107
|
}
|
117
108
|
]
|
118
109
|
},
|
@@ -124,7 +115,12 @@
|
|
124
115
|
"name": "meta.definition.variable.tsx variable.other.constant.tsx"
|
125
116
|
}
|
126
117
|
},
|
127
|
-
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))"
|
118
|
+
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
|
119
|
+
"patterns": [
|
120
|
+
{
|
121
|
+
"include": "#var-single-variable-type-annotation"
|
122
|
+
}
|
123
|
+
]
|
128
124
|
},
|
129
125
|
{
|
130
126
|
"name": "meta.var-single-variable.expr.tsx",
|
@@ -137,18 +133,25 @@
|
|
137
133
|
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
|
138
134
|
"patterns": [
|
139
135
|
{
|
140
|
-
"include": "#type-annotation"
|
141
|
-
},
|
142
|
-
{
|
143
|
-
"include": "#string"
|
144
|
-
},
|
145
|
-
{
|
146
|
-
"include": "#comment"
|
136
|
+
"include": "#var-single-variable-type-annotation"
|
147
137
|
}
|
148
138
|
]
|
149
139
|
}
|
150
140
|
]
|
151
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
|
+
},
|
152
155
|
"destructuring-variable": {
|
153
156
|
"patterns": [
|
154
157
|
{
|
@@ -334,7 +337,6 @@
|
|
334
337
|
]
|
335
338
|
},
|
336
339
|
"expression": {
|
337
|
-
"name": "meta.expression.tsx",
|
338
340
|
"patterns": [
|
339
341
|
{
|
340
342
|
"include": "#jsx"
|
@@ -352,10 +354,7 @@
|
|
352
354
|
"include": "#comment"
|
353
355
|
},
|
354
356
|
{
|
355
|
-
"include": "#
|
356
|
-
},
|
357
|
-
{
|
358
|
-
"include": "#function-declaration"
|
357
|
+
"include": "#function-expression"
|
359
358
|
},
|
360
359
|
{
|
361
360
|
"include": "#class-or-interface-declaration"
|
@@ -381,6 +380,9 @@
|
|
381
380
|
{
|
382
381
|
"include": "#function-call"
|
383
382
|
},
|
383
|
+
{
|
384
|
+
"include": "#literal"
|
385
|
+
},
|
384
386
|
{
|
385
387
|
"include": "#support-objects"
|
386
388
|
},
|
@@ -412,17 +414,6 @@
|
|
412
414
|
"name": "keyword.control.flow.tsx",
|
413
415
|
"match": "(?<!\\.|\\$)\\b(return)\\b(?!\\$)"
|
414
416
|
},
|
415
|
-
{
|
416
|
-
"match": "(?<!\\.|\\$)\\b(yield)\\b(?!\\$)(?:\\s*(\\*))?",
|
417
|
-
"captures": {
|
418
|
-
"1": {
|
419
|
-
"name": "keyword.control.flow.tsx"
|
420
|
-
},
|
421
|
-
"2": {
|
422
|
-
"name": "keyword.generator.asterisk.tsx"
|
423
|
-
}
|
424
|
-
}
|
425
|
-
},
|
426
417
|
{
|
427
418
|
"name": "keyword.control.switch.tsx",
|
428
419
|
"match": "(?<!\\.|\\$)\\b(case|default|switch)\\b(?!\\$)"
|
@@ -446,7 +437,6 @@
|
|
446
437
|
]
|
447
438
|
},
|
448
439
|
"declaration": {
|
449
|
-
"name": "meta.declaration.tsx",
|
450
440
|
"patterns": [
|
451
441
|
{
|
452
442
|
"include": "#decorator"
|
@@ -613,7 +603,7 @@
|
|
613
603
|
},
|
614
604
|
"namespace-declaration": {
|
615
605
|
"name": "meta.namespace.declaration.tsx",
|
616
|
-
"begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(namespace|module)\\s+",
|
606
|
+
"begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(namespace|module)\\s+(?=[_$[:alpha:]\"'`])",
|
617
607
|
"beginCaptures": {
|
618
608
|
"1": {
|
619
609
|
"name": "keyword.control.export.tsx"
|
@@ -883,7 +873,7 @@
|
|
883
873
|
},
|
884
874
|
"class-or-interface-declaration": {
|
885
875
|
"name": "meta.class.tsx",
|
886
|
-
"begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(?:(class)|(interface))\\b",
|
876
|
+
"begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(?:(class)|(interface))\\b(?=\\s+|/[/*])",
|
887
877
|
"beginCaptures": {
|
888
878
|
"1": {
|
889
879
|
"name": "keyword.control.export.tsx"
|
@@ -1018,6 +1008,12 @@
|
|
1018
1008
|
{
|
1019
1009
|
"include": "#property-accessor"
|
1020
1010
|
},
|
1011
|
+
{
|
1012
|
+
"include": "#after-operator-block"
|
1013
|
+
},
|
1014
|
+
{
|
1015
|
+
"include": "#decl-block"
|
1016
|
+
},
|
1021
1017
|
{
|
1022
1018
|
"include": "#expression"
|
1023
1019
|
},
|
@@ -1125,7 +1121,7 @@
|
|
1125
1121
|
},
|
1126
1122
|
{
|
1127
1123
|
"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)"
|
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)"
|
1129
1125
|
},
|
1130
1126
|
{
|
1131
1127
|
"name": "meta.definition.property.tsx variable.object.property.tsx",
|
@@ -1165,7 +1161,7 @@
|
|
1165
1161
|
"name": "keyword.generator.asterisk.tsx"
|
1166
1162
|
}
|
1167
1163
|
},
|
1168
|
-
"end": "(?=\\}
|
1164
|
+
"end": "(?=\\}|;|,|$)|(?<=\\})",
|
1169
1165
|
"patterns": [
|
1170
1166
|
{
|
1171
1167
|
"include": "#method-declaration-name"
|
@@ -1182,46 +1178,11 @@
|
|
1182
1178
|
{
|
1183
1179
|
"include": "#return-type"
|
1184
1180
|
},
|
1185
|
-
{
|
1186
|
-
"include": "#method-overload-declaration"
|
1187
|
-
},
|
1188
1181
|
{
|
1189
1182
|
"include": "#decl-block"
|
1190
1183
|
}
|
1191
1184
|
]
|
1192
1185
|
},
|
1193
|
-
"method-overload-declaration": {
|
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*[\\(\\<]))",
|
1195
|
-
"beginCaptures": {
|
1196
|
-
"1": {
|
1197
|
-
"name": "storage.modifier.tsx"
|
1198
|
-
},
|
1199
|
-
"2": {
|
1200
|
-
"name": "storage.modifier.tsx"
|
1201
|
-
},
|
1202
|
-
"3": {
|
1203
|
-
"name": "storage.modifier.async.tsx"
|
1204
|
-
},
|
1205
|
-
"4": {
|
1206
|
-
"name": "storage.type.property.tsx"
|
1207
|
-
},
|
1208
|
-
"5": {
|
1209
|
-
"name": "keyword.operator.new.tsx"
|
1210
|
-
},
|
1211
|
-
"6": {
|
1212
|
-
"name": "storage.type.tsx"
|
1213
|
-
},
|
1214
|
-
"7": {
|
1215
|
-
"name": "keyword.generator.asterisk.tsx"
|
1216
|
-
}
|
1217
|
-
},
|
1218
|
-
"end": "(?=\\(|\\<)",
|
1219
|
-
"patterns": [
|
1220
|
-
{
|
1221
|
-
"include": "#method-declaration-name"
|
1222
|
-
}
|
1223
|
-
]
|
1224
|
-
},
|
1225
1186
|
"method-declaration-name": {
|
1226
1187
|
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\<])",
|
1227
1188
|
"end": "(?=\\(|\\<)",
|
@@ -1274,7 +1235,7 @@
|
|
1274
1235
|
"include": "#return-type"
|
1275
1236
|
},
|
1276
1237
|
{
|
1277
|
-
"include": "#method-overload-declaration"
|
1238
|
+
"include": "#object-literal-method-overload-declaration"
|
1278
1239
|
},
|
1279
1240
|
{
|
1280
1241
|
"include": "#decl-block"
|
@@ -1382,7 +1343,7 @@
|
|
1382
1343
|
"name": "meta.definition.function.tsx entity.name.function.tsx"
|
1383
1344
|
}
|
1384
1345
|
},
|
1385
|
-
"end": "(
|
1346
|
+
"end": "(?=$|;)|(?<=\\})",
|
1386
1347
|
"patterns": [
|
1387
1348
|
{
|
1388
1349
|
"include": "#comment"
|
@@ -1396,34 +1357,46 @@
|
|
1396
1357
|
{
|
1397
1358
|
"include": "#return-type"
|
1398
1359
|
},
|
1399
|
-
{
|
1400
|
-
"include": "#function-overload-declaration"
|
1401
|
-
},
|
1402
1360
|
{
|
1403
1361
|
"include": "#decl-block"
|
1404
1362
|
}
|
1405
1363
|
]
|
1406
1364
|
},
|
1407
|
-
"function-
|
1408
|
-
"name": "meta.function.
|
1409
|
-
"
|
1410
|
-
"
|
1365
|
+
"function-expression": {
|
1366
|
+
"name": "meta.function.expression.tsx",
|
1367
|
+
"begin": "(?<!\\.|\\$)\\b(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
|
1368
|
+
"beginCaptures": {
|
1411
1369
|
"1": {
|
1412
|
-
"name": "keyword.control.export.tsx"
|
1413
|
-
},
|
1414
|
-
"2": {
|
1415
1370
|
"name": "storage.modifier.async.tsx"
|
1416
1371
|
},
|
1417
|
-
"
|
1372
|
+
"2": {
|
1418
1373
|
"name": "storage.type.function.tsx"
|
1419
1374
|
},
|
1420
|
-
"
|
1375
|
+
"3": {
|
1421
1376
|
"name": "keyword.generator.asterisk.tsx"
|
1422
1377
|
},
|
1423
|
-
"
|
1378
|
+
"4": {
|
1424
1379
|
"name": "meta.definition.function.tsx entity.name.function.tsx"
|
1425
1380
|
}
|
1426
|
-
}
|
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
|
+
]
|
1427
1400
|
},
|
1428
1401
|
"object-literal": {
|
1429
1402
|
"name": "meta.objectliteral.tsx",
|
@@ -1496,7 +1469,7 @@
|
|
1496
1469
|
}
|
1497
1470
|
},
|
1498
1471
|
{
|
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)",
|
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)",
|
1500
1473
|
"captures": {
|
1501
1474
|
"1": {
|
1502
1475
|
"name": "storage.modifier.tsx"
|
@@ -1694,7 +1667,7 @@
|
|
1694
1667
|
"name": "keyword.operator.type.annotation.tsx"
|
1695
1668
|
}
|
1696
1669
|
},
|
1697
|
-
"end": "(?<!:)((?=$)|(
|
1670
|
+
"end": "(?<!:)((?=$)|(?=[{};,]|//))",
|
1698
1671
|
"patterns": [
|
1699
1672
|
{
|
1700
1673
|
"include": "#comment"
|
@@ -1750,7 +1723,6 @@
|
|
1750
1723
|
]
|
1751
1724
|
},
|
1752
1725
|
"type": {
|
1753
|
-
"name": "meta.type.tsx",
|
1754
1726
|
"patterns": [
|
1755
1727
|
{
|
1756
1728
|
"include": "#comment"
|
@@ -1838,7 +1810,7 @@
|
|
1838
1810
|
},
|
1839
1811
|
"type-builtin-literals": {
|
1840
1812
|
"name": "support.type.builtin.tsx",
|
1841
|
-
"match": "(?<!\\.|\\$)\\b(this|true|false|undefined|null)\\b(?!\\$)"
|
1813
|
+
"match": "(?<!\\.|\\$)\\b(this|true|false|undefined|null|object)\\b(?!\\$)"
|
1842
1814
|
},
|
1843
1815
|
"type-paren-or-function-parameters": {
|
1844
1816
|
"name": "meta.type.paren.cover.tsx",
|
@@ -1889,16 +1861,6 @@
|
|
1889
1861
|
}
|
1890
1862
|
]
|
1891
1863
|
},
|
1892
|
-
{
|
1893
|
-
"name": "meta.type.function.tsx",
|
1894
|
-
"begin": "(?<=\\>)\\s*(?=\\()",
|
1895
|
-
"end": "(?<=\\))",
|
1896
|
-
"patterns": [
|
1897
|
-
{
|
1898
|
-
"include": "#function-parameters"
|
1899
|
-
}
|
1900
|
-
]
|
1901
|
-
},
|
1902
1864
|
{
|
1903
1865
|
"name": "meta.type.function.tsx",
|
1904
1866
|
"begin": "(?x)(\n (?=\n [(]\\s*(\n ([)]) | \n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )\n )\n)",
|
@@ -2031,6 +1993,10 @@
|
|
2031
1993
|
"name": "storage.modifier.tsx",
|
2032
1994
|
"match": "(?<!\\.|\\$)\\b(extends)\\b(?!\\$)"
|
2033
1995
|
},
|
1996
|
+
{
|
1997
|
+
"name": "keyword.operator.assignment.tsx",
|
1998
|
+
"match": "\\=(?!>)"
|
1999
|
+
},
|
2034
2000
|
{
|
2035
2001
|
"include": "#type"
|
2036
2002
|
},
|
@@ -2040,16 +2006,34 @@
|
|
2040
2006
|
]
|
2041
2007
|
},
|
2042
2008
|
"variable-initializer": {
|
2043
|
-
"begin": "(?<!=|!)(=)(?!=)",
|
2044
|
-
"beginCaptures": {
|
2045
|
-
"1": {
|
2046
|
-
"name": "keyword.operator.assignment.tsx"
|
2047
|
-
}
|
2048
|
-
},
|
2049
|
-
"end": "(?=$|[,);}\\]])",
|
2050
2009
|
"patterns": [
|
2051
2010
|
{
|
2052
|
-
"
|
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
|
+
]
|
2053
2037
|
}
|
2054
2038
|
]
|
2055
2039
|
},
|
@@ -2269,10 +2253,6 @@
|
|
2269
2253
|
"name": "support.class.node.tsx",
|
2270
2254
|
"match": "(?x)(?<!\\.|\\$)\\b(Buffer|EventEmitter|Server|Pipe|Socket|REPLServer|ReadStream|WriteStream|Stream\n |Inflate|Deflate|InflateRaw|DeflateRaw|GZip|GUnzip|Unzip|Zip)\\b(?!\\$)"
|
2271
2255
|
},
|
2272
|
-
{
|
2273
|
-
"name": "support.module.node.tsx",
|
2274
|
-
"match": "(?x)(?<!\\.|\\$)\\b(assert|buffer|child_process|cluster|constants|crypto|dgram|dns|domain|events|fs|http|https|net\n |os|path|punycode|querystring|readline|repl|stream|string_decoder|timers|tls|tty|url|util|vm|zlib)\\b(?!\\$)"
|
2275
|
-
},
|
2276
2256
|
{
|
2277
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(?!\\$)",
|
2278
2258
|
"captures": {
|
@@ -2331,12 +2311,18 @@
|
|
2331
2311
|
]
|
2332
2312
|
},
|
2333
2313
|
"function-call": {
|
2334
|
-
"begin": "(?=(\\.\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
|
2335
|
-
"end": "(?<=\\))(?!(\\.\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
|
2314
|
+
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
|
2315
|
+
"end": "(?<=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
|
2336
2316
|
"patterns": [
|
2317
|
+
{
|
2318
|
+
"include": "#literal"
|
2319
|
+
},
|
2337
2320
|
{
|
2338
2321
|
"include": "#support-objects"
|
2339
2322
|
},
|
2323
|
+
{
|
2324
|
+
"include": "#object-identifiers"
|
2325
|
+
},
|
2340
2326
|
{
|
2341
2327
|
"include": "#punctuation-accessor"
|
2342
2328
|
},
|
@@ -2378,53 +2364,68 @@
|
|
2378
2364
|
"identifiers": {
|
2379
2365
|
"patterns": [
|
2380
2366
|
{
|
2381
|
-
"
|
2382
|
-
"match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\.\\s*prototype\\b(?!\\$))"
|
2367
|
+
"include": "#object-identifiers"
|
2383
2368
|
},
|
2384
2369
|
{
|
2385
|
-
"match": "(?x)(\\.)\\s*(
|
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*=>)))",
|
2386
2371
|
"captures": {
|
2387
2372
|
"1": {
|
2388
2373
|
"name": "punctuation.accessor.tsx"
|
2389
2374
|
},
|
2390
2375
|
"2": {
|
2391
|
-
"name": "
|
2392
|
-
},
|
2393
|
-
"3": {
|
2394
|
-
"name": "variable.other.object.property.tsx"
|
2376
|
+
"name": "entity.name.function.tsx"
|
2395
2377
|
}
|
2396
2378
|
}
|
2397
2379
|
},
|
2398
2380
|
{
|
2399
|
-
"match": "(
|
2381
|
+
"match": "(\\.)\\s*([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
|
2400
2382
|
"captures": {
|
2401
2383
|
"1": {
|
2402
2384
|
"name": "punctuation.accessor.tsx"
|
2403
2385
|
},
|
2404
2386
|
"2": {
|
2405
|
-
"name": "
|
2387
|
+
"name": "variable.other.constant.property.tsx"
|
2406
2388
|
}
|
2407
2389
|
}
|
2408
2390
|
},
|
2409
2391
|
{
|
2410
|
-
"match": "(\\.)\\s*([
|
2392
|
+
"match": "(\\.)\\s*([_$[:alpha:]][_$[:alnum:]]*)",
|
2411
2393
|
"captures": {
|
2412
2394
|
"1": {
|
2413
2395
|
"name": "punctuation.accessor.tsx"
|
2414
2396
|
},
|
2415
2397
|
"2": {
|
2416
|
-
"name": "variable.other.
|
2398
|
+
"name": "variable.other.property.tsx"
|
2417
2399
|
}
|
2418
2400
|
}
|
2419
2401
|
},
|
2420
2402
|
{
|
2421
|
-
"
|
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:]]*)",
|
2422
2420
|
"captures": {
|
2423
2421
|
"1": {
|
2424
2422
|
"name": "punctuation.accessor.tsx"
|
2425
2423
|
},
|
2426
2424
|
"2": {
|
2427
|
-
"name": "variable.other.property.tsx"
|
2425
|
+
"name": "variable.other.constant.object.property.tsx"
|
2426
|
+
},
|
2427
|
+
"3": {
|
2428
|
+
"name": "variable.other.object.property.tsx"
|
2428
2429
|
}
|
2429
2430
|
}
|
2430
2431
|
},
|
@@ -2438,14 +2439,6 @@
|
|
2438
2439
|
"name": "variable.other.object.tsx"
|
2439
2440
|
}
|
2440
2441
|
}
|
2441
|
-
},
|
2442
|
-
{
|
2443
|
-
"name": "variable.other.constant.tsx",
|
2444
|
-
"match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
|
2445
|
-
},
|
2446
|
-
{
|
2447
|
-
"name": "variable.other.readwrite.tsx",
|
2448
|
-
"match": "[_$[:alpha:]][_$[:alnum:]]*"
|
2449
2442
|
}
|
2450
2443
|
]
|
2451
2444
|
},
|
@@ -2464,7 +2457,7 @@
|
|
2464
2457
|
"name": "keyword.operator.new.tsx"
|
2465
2458
|
}
|
2466
2459
|
},
|
2467
|
-
"end": "(?<=\\))|(?=[;),]|$|((?<!\\.|\\$)\\bnew\\b(?!\\$)))",
|
2460
|
+
"end": "(?<=\\))|(?=[;),}]|$|((?<!\\.|\\$)\\bnew\\b(?!\\$)))",
|
2468
2461
|
"patterns": [
|
2469
2462
|
{
|
2470
2463
|
"include": "#paren-expression"
|
@@ -2515,7 +2508,7 @@
|
|
2515
2508
|
},
|
2516
2509
|
{
|
2517
2510
|
"name": "meta.object.member.tsx",
|
2518
|
-
"begin": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)(?=\\s*(\n (async\\s+)|(function\\s*[(<])|(function\\s+)|\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)|\n ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>))))",
|
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*=>))))",
|
2519
2512
|
"beginCaptures": {
|
2520
2513
|
"0": {
|
2521
2514
|
"name": "meta.object-literal.key.tsx"
|
@@ -2587,6 +2580,17 @@
|
|
2587
2580
|
"name": "keyword.control.flow.tsx",
|
2588
2581
|
"match": "(?<!\\.|\\$)\\b(await)\\b(?!\\$)"
|
2589
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
|
+
},
|
2590
2594
|
{
|
2591
2595
|
"name": "keyword.operator.expression.delete.tsx",
|
2592
2596
|
"match": "(?<!\\.|\\$)\\bdelete\\b(?!\\$)"
|
@@ -2692,15 +2696,6 @@
|
|
2692
2696
|
},
|
2693
2697
|
"arrow-function": {
|
2694
2698
|
"patterns": [
|
2695
|
-
{
|
2696
|
-
"name": "meta.arrow.tsx",
|
2697
|
-
"match": "(?<!\\.|\\$)(\\basync)(?=\\s*[<(])",
|
2698
|
-
"captures": {
|
2699
|
-
"1": {
|
2700
|
-
"name": "storage.modifier.async.tsx"
|
2701
|
-
}
|
2702
|
-
}
|
2703
|
-
},
|
2704
2699
|
{
|
2705
2700
|
"name": "meta.arrow.tsx",
|
2706
2701
|
"match": "(?:(?<!\\.|\\$)(\\basync)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?==>)",
|
@@ -2715,8 +2710,13 @@
|
|
2715
2710
|
},
|
2716
2711
|
{
|
2717
2712
|
"name": "meta.arrow.tsx",
|
2718
|
-
"begin": "(?x)\\s*(
|
2719
|
-
"
|
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
2720
|
"patterns": [
|
2721
2721
|
{
|
2722
2722
|
"include": "#comment"
|
@@ -2760,8 +2760,28 @@
|
|
2760
2760
|
"name": "keyword.operator.type.annotation.tsx"
|
2761
2761
|
}
|
2762
2762
|
},
|
2763
|
-
"end": "(
|
2763
|
+
"end": "(?==>|\\{)",
|
2764
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
|
+
},
|
2765
2785
|
{
|
2766
2786
|
"include": "#type-predicate-operator"
|
2767
2787
|
},
|
@@ -2853,7 +2873,7 @@
|
|
2853
2873
|
"regex": {
|
2854
2874
|
"patterns": [
|
2855
2875
|
{
|
2856
|
-
"name": "string.
|
2876
|
+
"name": "string.regexp.tsx",
|
2857
2877
|
"begin": "(?<=[=(:,\\[?+!]|return|case|=>|&&|\\|\\||\\*\\/)\\s*(/)(?![/*])(?=(?:[^/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+/(?![/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))",
|
2858
2878
|
"beginCaptures": {
|
2859
2879
|
"1": {
|
@@ -2876,7 +2896,7 @@
|
|
2876
2896
|
]
|
2877
2897
|
},
|
2878
2898
|
{
|
2879
|
-
"name": "string.
|
2899
|
+
"name": "string.regexp.tsx",
|
2880
2900
|
"begin": "(?<![_$[:alnum:]])/(?![/*])(?=(?:[^/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+/(?![/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))",
|
2881
2901
|
"beginCaptures": {
|
2882
2902
|
"0": {
|
@@ -3103,7 +3123,6 @@
|
|
3103
3123
|
]
|
3104
3124
|
},
|
3105
3125
|
"literal": {
|
3106
|
-
"name": "literal.tsx",
|
3107
3126
|
"patterns": [
|
3108
3127
|
{
|
3109
3128
|
"include": "#numeric-literal"
|