github-linguist 6.3.1 → 6.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/bin/git-linguist +9 -5
- data/grammars/source.ats.json +87 -17
- data/grammars/source.autoit.json +3 -0
- data/grammars/source.ballerina.json +115 -1
- data/grammars/source.gap.json +6 -0
- data/grammars/source.modula-3.json +78 -0
- data/grammars/source.powershell.json +1 -1
- data/grammars/source.python.json +27 -22
- data/grammars/source.quake.json +44 -0
- data/grammars/source.ts.json +282 -44
- data/grammars/source.tsx.json +291 -53
- data/grammars/text.html.basic.json +2348 -531
- data/lib/linguist/heuristics.rb +5 -3
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +23 -0
- data/lib/linguist/samples.json +727 -86
- data/lib/linguist/version.rb +1 -1
- metadata +5 -3
data/grammars/source.tsx.json
CHANGED
@@ -68,6 +68,31 @@
|
|
68
68
|
}
|
69
69
|
}
|
70
70
|
},
|
71
|
+
"array-binding-pattern-const": {
|
72
|
+
"begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
|
73
|
+
"end": "\\]",
|
74
|
+
"patterns": [
|
75
|
+
{
|
76
|
+
"include": "#binding-element-const"
|
77
|
+
},
|
78
|
+
{
|
79
|
+
"include": "#punctuation-comma"
|
80
|
+
}
|
81
|
+
],
|
82
|
+
"beginCaptures": {
|
83
|
+
"1": {
|
84
|
+
"name": "keyword.operator.rest.tsx"
|
85
|
+
},
|
86
|
+
"2": {
|
87
|
+
"name": "punctuation.definition.binding-pattern.array.tsx"
|
88
|
+
}
|
89
|
+
},
|
90
|
+
"endCaptures": {
|
91
|
+
"0": {
|
92
|
+
"name": "punctuation.definition.binding-pattern.array.tsx"
|
93
|
+
}
|
94
|
+
}
|
95
|
+
},
|
71
96
|
"array-literal": {
|
72
97
|
"name": "meta.array.literal.tsx",
|
73
98
|
"begin": "\\s*(\\[)",
|
@@ -209,6 +234,28 @@
|
|
209
234
|
}
|
210
235
|
]
|
211
236
|
},
|
237
|
+
"binding-element-const": {
|
238
|
+
"patterns": [
|
239
|
+
{
|
240
|
+
"include": "#comment"
|
241
|
+
},
|
242
|
+
{
|
243
|
+
"include": "#string"
|
244
|
+
},
|
245
|
+
{
|
246
|
+
"include": "#object-binding-pattern-const"
|
247
|
+
},
|
248
|
+
{
|
249
|
+
"include": "#array-binding-pattern-const"
|
250
|
+
},
|
251
|
+
{
|
252
|
+
"include": "#destructuring-variable-rest-const"
|
253
|
+
},
|
254
|
+
{
|
255
|
+
"include": "#variable-initializer"
|
256
|
+
}
|
257
|
+
]
|
258
|
+
},
|
212
259
|
"boolean-literal": {
|
213
260
|
"patterns": [
|
214
261
|
{
|
@@ -618,6 +665,42 @@
|
|
618
665
|
}
|
619
666
|
}
|
620
667
|
},
|
668
|
+
"destructuring-const": {
|
669
|
+
"patterns": [
|
670
|
+
{
|
671
|
+
"name": "meta.object-binding-pattern-variable.tsx",
|
672
|
+
"begin": "(?\u003c!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)",
|
673
|
+
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
|
674
|
+
"patterns": [
|
675
|
+
{
|
676
|
+
"include": "#object-binding-pattern-const"
|
677
|
+
},
|
678
|
+
{
|
679
|
+
"include": "#type-annotation"
|
680
|
+
},
|
681
|
+
{
|
682
|
+
"include": "#comment"
|
683
|
+
}
|
684
|
+
]
|
685
|
+
},
|
686
|
+
{
|
687
|
+
"name": "meta.array-binding-pattern-variable.tsx",
|
688
|
+
"begin": "(?\u003c!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)",
|
689
|
+
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
|
690
|
+
"patterns": [
|
691
|
+
{
|
692
|
+
"include": "#array-binding-pattern-const"
|
693
|
+
},
|
694
|
+
{
|
695
|
+
"include": "#type-annotation"
|
696
|
+
},
|
697
|
+
{
|
698
|
+
"include": "#comment"
|
699
|
+
}
|
700
|
+
]
|
701
|
+
}
|
702
|
+
]
|
703
|
+
},
|
621
704
|
"destructuring-parameter": {
|
622
705
|
"patterns": [
|
623
706
|
{
|
@@ -723,6 +806,17 @@
|
|
723
806
|
}
|
724
807
|
}
|
725
808
|
},
|
809
|
+
"destructuring-variable-rest-const": {
|
810
|
+
"match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
|
811
|
+
"captures": {
|
812
|
+
"1": {
|
813
|
+
"name": "keyword.operator.rest.tsx"
|
814
|
+
},
|
815
|
+
"2": {
|
816
|
+
"name": "meta.definition.variable.tsx variable.other.constant.tsx"
|
817
|
+
}
|
818
|
+
}
|
819
|
+
},
|
726
820
|
"directives": {
|
727
821
|
"name": "comment.line.triple-slash.directive.tsx",
|
728
822
|
"begin": "^(///)\\s*(?=\u003c(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name)\\s*=\\s*((\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")))+\\s*/\u003e\\s*$)",
|
@@ -1189,7 +1283,7 @@
|
|
1189
1283
|
{
|
1190
1284
|
"name": "meta.export.default.tsx",
|
1191
1285
|
"begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(export)(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))",
|
1192
|
-
"end": "(
|
1286
|
+
"end": "(?=$|;|^\\s*abstract\\b|^\\s*async\\b|^\\s*class\\b|^\\s*const\\b|^\\s*declare\\b|^\\s*enum\\b|^\\s*export\\b|^\\s*function\\b|^\\s*import\\b|^\\s*interface\\b|^\\s*let\\b|^\\s*module\\b|^\\s*namespace\\b|^\\s*return\\b|^\\s*type\\b|^\\s*var\\b)",
|
1193
1287
|
"patterns": [
|
1194
1288
|
{
|
1195
1289
|
"include": "#expression"
|
@@ -1210,7 +1304,7 @@
|
|
1210
1304
|
{
|
1211
1305
|
"name": "meta.export.tsx",
|
1212
1306
|
"begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(export)(?!\\s*:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
|
1213
|
-
"end": "(
|
1307
|
+
"end": "(?=$|;|^\\s*abstract\\b|^\\s*async\\b|^\\s*class\\b|^\\s*const\\b|^\\s*declare\\b|^\\s*enum\\b|^\\s*export\\b|^\\s*function\\b|^\\s*import\\b|^\\s*interface\\b|^\\s*let\\b|^\\s*module\\b|^\\s*namespace\\b|^\\s*return\\b|^\\s*type\\b|^\\s*var\\b)",
|
1214
1308
|
"patterns": [
|
1215
1309
|
{
|
1216
1310
|
"include": "#import-export-declaration"
|
@@ -1487,7 +1581,7 @@
|
|
1487
1581
|
"include": "#comment"
|
1488
1582
|
},
|
1489
1583
|
{
|
1490
|
-
"match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\?)?(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*([\\{\\[]\\s*)?$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: \u003c | () | (... | (param: | (param, | (param? | (param= | (param) =\u003e\n(:\\s*(\n (\u003c) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=\u003e)\n ))\n ))\n)) |\n(:\\s*([\\(]\\s*([\\{\\[]\\s*)?$)) |\n(:\\s*(=\u003e|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\u003c[^\u003c\u003e]*\u003e)|[^\u003c\u003e(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*([\\{\\[]\\s*)?$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
|
1584
|
+
"match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\?)?(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ((\u003c\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: \u003c | () | (... | (param: | (param, | (param? | (param= | (param) =\u003e\n(:\\s*(\n (\u003c) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=\u003e)\n ))\n ))\n)) |\n(:\\s*((\u003c\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=\u003e|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\u003c[^\u003c\u003e]*\u003e)|[^\u003c\u003e(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ((\u003c\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
|
1491
1585
|
"captures": {
|
1492
1586
|
"1": {
|
1493
1587
|
"name": "meta.definition.property.tsx entity.name.function.tsx"
|
@@ -1739,7 +1833,7 @@
|
|
1739
1833
|
"include": "#object-identifiers"
|
1740
1834
|
},
|
1741
1835
|
{
|
1742
|
-
"match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*([\\{\\[]\\s*)?$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n))",
|
1836
|
+
"match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ((\u003c\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n))",
|
1743
1837
|
"captures": {
|
1744
1838
|
"1": {
|
1745
1839
|
"name": "punctuation.accessor.tsx"
|
@@ -2319,11 +2413,11 @@
|
|
2319
2413
|
},
|
2320
2414
|
"jsx-tag": {
|
2321
2415
|
"name": "meta.tag.tsx",
|
2322
|
-
"begin": "(?=(\u003c)\\s*(?:([_$
|
2323
|
-
"end": "(/\u003e)|(?:(\u003c/)\\s*(?:([_$
|
2416
|
+
"begin": "(?=(\u003c)\\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?\u003c!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?\u003c!\\.|-))(?=((\u003c\\s*)|(\\s+))(?!\\?)|\\/?\u003e))",
|
2417
|
+
"end": "(/\u003e)|(?:(\u003c/)\\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?\u003c!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?\u003c!\\.|-))?\\s*(\u003e))",
|
2324
2418
|
"patterns": [
|
2325
2419
|
{
|
2326
|
-
"begin": "(\u003c)\\s*(?:([_$
|
2420
|
+
"begin": "(\u003c)\\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?\u003c!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?\u003c!\\.|-))(?=((\u003c\\s*)|(\\s+))(?!\\?)|\\/?\u003e)",
|
2327
2421
|
"end": "(?=[/]?\u003e)",
|
2328
2422
|
"patterns": [
|
2329
2423
|
{
|
@@ -2399,7 +2493,7 @@
|
|
2399
2493
|
"match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))"
|
2400
2494
|
},
|
2401
2495
|
"jsx-tag-attribute-name": {
|
2402
|
-
"match": "(?x)\n \\s*\n (?:([_$
|
2496
|
+
"match": "(?x)\n \\s*\n (?:([_$[:alpha:]][-$[:alnum:].]*)(:))?\n ([_$[:alpha:]][-$[:alnum:]]*)\n (?=\\s|=|/?\u003e|/\\*|//)",
|
2403
2497
|
"captures": {
|
2404
2498
|
"1": {
|
2405
2499
|
"name": "entity.other.attribute-name.namespace.tsx"
|
@@ -2445,8 +2539,8 @@
|
|
2445
2539
|
"match": "\\S+"
|
2446
2540
|
},
|
2447
2541
|
"jsx-tag-in-expression": {
|
2448
|
-
"begin": "(?x)\n (?\u003c!\\+\\+|--)(?\u003c=[({\\[,?=\u003e:*]|\u0026\u0026|\\|\\||\\?|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*\n (?!\u003c\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=\u003e])|,)) # look ahead is not type parameter of arrow\n (?=(\u003c)\\s*(?:([_$
|
2449
|
-
"end": "(?!(\u003c)\\s*(?:([_$
|
2542
|
+
"begin": "(?x)\n (?\u003c!\\+\\+|--)(?\u003c=[({\\[,?=\u003e:*]|\u0026\u0026|\\|\\||\\?|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*\n (?!\u003c\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=\u003e])|,)) # look ahead is not type parameter of arrow\n (?=(\u003c)\\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?\u003c!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?\u003c!\\.|-))(?=((\u003c\\s*)|(\\s+))(?!\\?)|\\/?\u003e))",
|
2543
|
+
"end": "(?!(\u003c)\\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?\u003c!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?\u003c!\\.|-))(?=((\u003c\\s*)|(\\s+))(?!\\?)|\\/?\u003e))",
|
2450
2544
|
"patterns": [
|
2451
2545
|
{
|
2452
2546
|
"include": "#jsx-tag"
|
@@ -2456,8 +2550,8 @@
|
|
2456
2550
|
"jsx-tag-without-attributes": {
|
2457
2551
|
"name": "meta.tag.without-attributes.tsx",
|
2458
2552
|
"contentName": "meta.jsx.children.tsx",
|
2459
|
-
"begin": "(\u003c)\\s*(?:([_$
|
2460
|
-
"end": "(\u003c/)\\s*(?:([_$
|
2553
|
+
"begin": "(\u003c)\\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?\u003c!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?\u003c!\\.|-))?\\s*(\u003e)",
|
2554
|
+
"end": "(\u003c/)\\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?\u003c!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?\u003c!\\.|-))?\\s*(\u003e)",
|
2461
2555
|
"patterns": [
|
2462
2556
|
{
|
2463
2557
|
"include": "#jsx-children"
|
@@ -2505,8 +2599,8 @@
|
|
2505
2599
|
}
|
2506
2600
|
},
|
2507
2601
|
"jsx-tag-without-attributes-in-expression": {
|
2508
|
-
"begin": "(?\u003c!\\+\\+|--)(?\u003c=[({\\[,?=\u003e:*]|\u0026\u0026|\\|\\||\\?|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*(?=(\u003c)\\s*(?:([_$
|
2509
|
-
"end": "(?!(\u003c)\\s*(?:([_$
|
2602
|
+
"begin": "(?\u003c!\\+\\+|--)(?\u003c=[({\\[,?=\u003e:*]|\u0026\u0026|\\|\\||\\?|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*(?=(\u003c)\\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?\u003c!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?\u003c!\\.|-))?\\s*(\u003e))",
|
2603
|
+
"end": "(?!(\u003c)\\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?\u003c!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?\u003c!\\.|-))?\\s*(\u003e))",
|
2510
2604
|
"patterns": [
|
2511
2605
|
{
|
2512
2606
|
"include": "#jsx-tag-without-attributes"
|
@@ -2690,7 +2784,7 @@
|
|
2690
2784
|
"namespace-declaration": {
|
2691
2785
|
"name": "meta.namespace.declaration.tsx",
|
2692
2786
|
"begin": "(?:(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(\\bexport)\\s+)?\\b(namespace|module)\\s+(?=[_$[:alpha:]\"'`]))",
|
2693
|
-
"end": "(?\u003c=\\})|(
|
2787
|
+
"end": "(?\u003c=\\})|(?=;|^\\s*abstract\\b|^\\s*async\\b|^\\s*class\\b|^\\s*const\\b|^\\s*declare\\b|^\\s*enum\\b|^\\s*export\\b|^\\s*function\\b|^\\s*import\\b|^\\s*interface\\b|^\\s*let\\b|^\\s*module\\b|^\\s*namespace\\b|^\\s*return\\b|^\\s*type\\b|^\\s*var\\b)",
|
2694
2788
|
"patterns": [
|
2695
2789
|
{
|
2696
2790
|
"include": "#comment"
|
@@ -2828,6 +2922,37 @@
|
|
2828
2922
|
}
|
2829
2923
|
]
|
2830
2924
|
},
|
2925
|
+
"object-binding-element-const": {
|
2926
|
+
"patterns": [
|
2927
|
+
{
|
2928
|
+
"include": "#comment"
|
2929
|
+
},
|
2930
|
+
{
|
2931
|
+
"begin": "(?x)(?=((\\b(?\u003c!\\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(b|B)[01][01_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(o|O)?[0-7][0-7_]*\\b(?!\\$))|((?\u003c!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*\\b)| # .1\n (?:\\b[0-9][0-9_]*\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
|
2932
|
+
"end": "(?=,|\\})",
|
2933
|
+
"patterns": [
|
2934
|
+
{
|
2935
|
+
"include": "#object-binding-element-propertyName"
|
2936
|
+
},
|
2937
|
+
{
|
2938
|
+
"include": "#binding-element-const"
|
2939
|
+
}
|
2940
|
+
]
|
2941
|
+
},
|
2942
|
+
{
|
2943
|
+
"include": "#object-binding-pattern-const"
|
2944
|
+
},
|
2945
|
+
{
|
2946
|
+
"include": "#destructuring-variable-rest-const"
|
2947
|
+
},
|
2948
|
+
{
|
2949
|
+
"include": "#variable-initializer"
|
2950
|
+
},
|
2951
|
+
{
|
2952
|
+
"include": "#punctuation-comma"
|
2953
|
+
}
|
2954
|
+
]
|
2955
|
+
},
|
2831
2956
|
"object-binding-element-propertyName": {
|
2832
2957
|
"begin": "(?x)(?=((\\b(?\u003c!\\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(b|B)[01][01_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(o|O)?[0-7][0-7_]*\\b(?!\\$))|((?\u003c!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*\\b)| # .1\n (?:\\b[0-9][0-9_]*\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
|
2833
2958
|
"end": "(:)",
|
@@ -2874,6 +2999,28 @@
|
|
2874
2999
|
}
|
2875
3000
|
}
|
2876
3001
|
},
|
3002
|
+
"object-binding-pattern-const": {
|
3003
|
+
"begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
|
3004
|
+
"end": "\\}",
|
3005
|
+
"patterns": [
|
3006
|
+
{
|
3007
|
+
"include": "#object-binding-element-const"
|
3008
|
+
}
|
3009
|
+
],
|
3010
|
+
"beginCaptures": {
|
3011
|
+
"1": {
|
3012
|
+
"name": "keyword.operator.rest.tsx"
|
3013
|
+
},
|
3014
|
+
"2": {
|
3015
|
+
"name": "punctuation.definition.binding-pattern.object.tsx"
|
3016
|
+
}
|
3017
|
+
},
|
3018
|
+
"endCaptures": {
|
3019
|
+
"0": {
|
3020
|
+
"name": "punctuation.definition.binding-pattern.object.tsx"
|
3021
|
+
}
|
3022
|
+
}
|
3023
|
+
},
|
2877
3024
|
"object-identifiers": {
|
2878
3025
|
"patterns": [
|
2879
3026
|
{
|
@@ -3026,7 +3173,7 @@
|
|
3026
3173
|
},
|
3027
3174
|
{
|
3028
3175
|
"name": "meta.object.member.tsx",
|
3029
|
-
"match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*([\\{\\[]\\s*)?$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
|
3176
|
+
"match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ((\u003c\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
|
3030
3177
|
"captures": {
|
3031
3178
|
"0": {
|
3032
3179
|
"name": "meta.object-literal.key.tsx"
|
@@ -3212,7 +3359,7 @@
|
|
3212
3359
|
}
|
3213
3360
|
},
|
3214
3361
|
{
|
3215
|
-
"match": "(?x)(?:(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?\u003c!=|:)(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*([\\{\\[]\\s*)?$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: \u003c | () | (... | (param: | (param, | (param? | (param= | (param) =\u003e\n(:\\s*(\n (\u003c) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=\u003e)\n ))\n ))\n)) |\n(:\\s*([\\(]\\s*([\\{\\[]\\s*)?$)) |\n(:\\s*(=\u003e|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\u003c[^\u003c\u003e]*\u003e)|[^\u003c\u003e(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*([\\{\\[]\\s*)?$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
|
3362
|
+
"match": "(?x)(?:(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?\u003c!=|:)(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ((\u003c\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: \u003c | () | (... | (param: | (param, | (param? | (param= | (param) =\u003e\n(:\\s*(\n (\u003c) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=\u003e)\n ))\n ))\n)) |\n(:\\s*((\u003c\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=\u003e|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\u003c[^\u003c\u003e]*\u003e)|[^\u003c\u003e(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ((\u003c\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
|
3216
3363
|
"captures": {
|
3217
3364
|
"1": {
|
3218
3365
|
"name": "storage.modifier.tsx"
|
@@ -3342,7 +3489,7 @@
|
|
3342
3489
|
}
|
3343
3490
|
},
|
3344
3491
|
{
|
3345
|
-
"begin": "(?\u003c=[(=,]|=\u003e)\\s*(async)?(?=\\s*((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*))?\\(\\s*$)",
|
3492
|
+
"begin": "(?\u003c=[(=,]|=\u003e)\\s*(async)?(?=\\s*((((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*))?\\()|(\u003c))\\s*$)",
|
3346
3493
|
"end": "(?\u003c=\\))",
|
3347
3494
|
"patterns": [
|
3348
3495
|
{
|
@@ -3474,7 +3621,7 @@
|
|
3474
3621
|
"patterns": [
|
3475
3622
|
{
|
3476
3623
|
"name": "string.regexp.tsx",
|
3477
|
-
"begin": "(?\u003c
|
3624
|
+
"begin": "(?\u003c!\\+\\+|--|})(?\u003c=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=\u003e|\u0026\u0026|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/[gimsuy]*(?!\\s*[a-zA-Z0-9_$]))",
|
3478
3625
|
"end": "(/)([gimsuy]*)",
|
3479
3626
|
"patterns": [
|
3480
3627
|
{
|
@@ -3497,7 +3644,7 @@
|
|
3497
3644
|
},
|
3498
3645
|
{
|
3499
3646
|
"name": "string.regexp.tsx",
|
3500
|
-
"begin": "(?\u003c![_$[:alnum:])\\]]
|
3647
|
+
"begin": "(?\u003c![_$[:alnum:])\\]]|\\+\\+|--|})\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/[gimsuy]*(?!\\s*[a-zA-Z0-9_$]))",
|
3501
3648
|
"end": "(/)([gimsuy]*)",
|
3502
3649
|
"patterns": [
|
3503
3650
|
{
|
@@ -4248,7 +4395,7 @@
|
|
4248
4395
|
"type-alias-declaration": {
|
4249
4396
|
"name": "meta.type.declaration.tsx",
|
4250
4397
|
"begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(\\bexport)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*",
|
4251
|
-
"end": "(?=\\}
|
4398
|
+
"end": "(?=\\}|;|^\\s*abstract\\b|^\\s*async\\b|^\\s*class\\b|^\\s*const\\b|^\\s*declare\\b|^\\s*enum\\b|^\\s*export\\b|^\\s*function\\b|^\\s*import\\b|^\\s*interface\\b|^\\s*let\\b|^\\s*module\\b|^\\s*namespace\\b|^\\s*return\\b|^\\s*type\\b|^\\s*var\\b)",
|
4252
4399
|
"patterns": [
|
4253
4400
|
{
|
4254
4401
|
"include": "#comment"
|
@@ -4258,7 +4405,7 @@
|
|
4258
4405
|
},
|
4259
4406
|
{
|
4260
4407
|
"begin": "(=)\\s*",
|
4261
|
-
"end": "(?=\\}
|
4408
|
+
"end": "(?=\\}|;|^\\s*abstract\\b|^\\s*async\\b|^\\s*class\\b|^\\s*const\\b|^\\s*declare\\b|^\\s*enum\\b|^\\s*export\\b|^\\s*function\\b|^\\s*import\\b|^\\s*interface\\b|^\\s*let\\b|^\\s*module\\b|^\\s*namespace\\b|^\\s*return\\b|^\\s*type\\b|^\\s*var\\b)",
|
4262
4409
|
"patterns": [
|
4263
4410
|
{
|
4264
4411
|
"include": "#type"
|
@@ -4646,7 +4793,7 @@
|
|
4646
4793
|
"include": "#destructuring-parameter"
|
4647
4794
|
},
|
4648
4795
|
{
|
4649
|
-
"match": "(?x)(?:(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?\u003c!=|:)(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=\\s*(:\\s*(\n (\u003c) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=\u003e)\n ))\n ))\n)) |\n(:\\s*([\\(]\\s*([\\{\\[]\\s*)?$)))",
|
4796
|
+
"match": "(?x)(?:(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?\u003c!=|:)(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=\\s*(:\\s*(\n (\u003c) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=\u003e)\n ))\n ))\n)) |\n(:\\s*((\u003c\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))))",
|
4650
4797
|
"captures": {
|
4651
4798
|
"1": {
|
4652
4799
|
"name": "storage.modifier.tsx"
|
@@ -4747,63 +4894,154 @@
|
|
4747
4894
|
"match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))undefined(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
|
4748
4895
|
},
|
4749
4896
|
"var-expr": {
|
4750
|
-
"name": "meta.var.expr.tsx",
|
4751
|
-
"begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(\\bexport)\\s+)?\\b(var|let|const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
|
4752
|
-
"end": "(?=$|^|;|}|(\\s+(of|in)\\s+))",
|
4753
4897
|
"patterns": [
|
4754
4898
|
{
|
4755
|
-
"
|
4756
|
-
|
4757
|
-
|
4758
|
-
"include": "#var-single-variable"
|
4759
|
-
},
|
4760
|
-
{
|
4761
|
-
"include": "#variable-initializer"
|
4762
|
-
},
|
4763
|
-
{
|
4764
|
-
"include": "#comment"
|
4765
|
-
},
|
4766
|
-
{
|
4767
|
-
"begin": "(,)\\s*(?!\\S)",
|
4768
|
-
"end": "(?\u003c!,)(((?==|;|}|(\\s+(of|in)\\s+)|^\\s*$))|((?\u003c=\\S)(?=\\s*$)))",
|
4899
|
+
"name": "meta.var.expr.tsx",
|
4900
|
+
"begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(\\bexport)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
|
4901
|
+
"end": "((?=;|}|(\\s+(of|in)\\s+)|^\\s*$|;|^\\s*abstract\\b|^\\s*async\\b|^\\s*class\\b|^\\s*const\\b|^\\s*declare\\b|^\\s*enum\\b|^\\s*export\\b|^\\s*function\\b|^\\s*import\\b|^\\s*interface\\b|^\\s*let\\b|^\\s*module\\b|^\\s*namespace\\b|^\\s*return\\b|^\\s*type\\b|^\\s*var\\b)|((?\u003c=\\S)(?\u003c!^let|[^\\._$[:alnum:]]let|^var|[^\\._$[:alnum:]]var)(?=\\s*$)))",
|
4769
4902
|
"patterns": [
|
4770
|
-
{
|
4771
|
-
"include": "#comment"
|
4772
|
-
},
|
4773
4903
|
{
|
4774
4904
|
"include": "#destructuring-variable"
|
4775
4905
|
},
|
4776
4906
|
{
|
4777
4907
|
"include": "#var-single-variable"
|
4778
4908
|
},
|
4909
|
+
{
|
4910
|
+
"include": "#variable-initializer"
|
4911
|
+
},
|
4912
|
+
{
|
4913
|
+
"include": "#comment"
|
4914
|
+
},
|
4915
|
+
{
|
4916
|
+
"begin": "(,)\\s*(?!\\S)",
|
4917
|
+
"end": "(?\u003c!,)(((?==|;|}|(\\s+(of|in)\\s+)|^\\s*$))|((?\u003c=\\S)(?=\\s*$)))",
|
4918
|
+
"patterns": [
|
4919
|
+
{
|
4920
|
+
"include": "#comment"
|
4921
|
+
},
|
4922
|
+
{
|
4923
|
+
"include": "#destructuring-variable"
|
4924
|
+
},
|
4925
|
+
{
|
4926
|
+
"include": "#var-single-variable"
|
4927
|
+
},
|
4928
|
+
{
|
4929
|
+
"include": "#punctuation-comma"
|
4930
|
+
}
|
4931
|
+
],
|
4932
|
+
"beginCaptures": {
|
4933
|
+
"1": {
|
4934
|
+
"name": "punctuation.separator.comma.tsx"
|
4935
|
+
}
|
4936
|
+
}
|
4937
|
+
},
|
4779
4938
|
{
|
4780
4939
|
"include": "#punctuation-comma"
|
4781
4940
|
}
|
4782
4941
|
],
|
4783
4942
|
"beginCaptures": {
|
4784
4943
|
"1": {
|
4785
|
-
"name": "
|
4944
|
+
"name": "keyword.control.export.tsx"
|
4945
|
+
},
|
4946
|
+
"2": {
|
4947
|
+
"name": "storage.type.tsx"
|
4786
4948
|
}
|
4787
4949
|
}
|
4788
4950
|
},
|
4789
4951
|
{
|
4790
|
-
"
|
4952
|
+
"name": "meta.var.expr.tsx",
|
4953
|
+
"begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(\\bexport)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
|
4954
|
+
"end": "((?=;|}|(\\s+(of|in)\\s+)|^\\s*$|;|^\\s*abstract\\b|^\\s*async\\b|^\\s*class\\b|^\\s*const\\b|^\\s*declare\\b|^\\s*enum\\b|^\\s*export\\b|^\\s*function\\b|^\\s*import\\b|^\\s*interface\\b|^\\s*let\\b|^\\s*module\\b|^\\s*namespace\\b|^\\s*return\\b|^\\s*type\\b|^\\s*var\\b)|((?\u003c=\\S)(?\u003c!^const|[^\\._$[:alnum:]]const)(?=\\s*$)))",
|
4955
|
+
"patterns": [
|
4956
|
+
{
|
4957
|
+
"include": "#destructuring-const"
|
4958
|
+
},
|
4959
|
+
{
|
4960
|
+
"include": "#var-single-const"
|
4961
|
+
},
|
4962
|
+
{
|
4963
|
+
"include": "#variable-initializer"
|
4964
|
+
},
|
4965
|
+
{
|
4966
|
+
"include": "#comment"
|
4967
|
+
},
|
4968
|
+
{
|
4969
|
+
"begin": "(,)\\s*(?!\\S)",
|
4970
|
+
"end": "(?\u003c!,)(((?==|;|}|(\\s+(of|in)\\s+)|^\\s*$))|((?\u003c=\\S)(?=\\s*$)))",
|
4971
|
+
"patterns": [
|
4972
|
+
{
|
4973
|
+
"include": "#comment"
|
4974
|
+
},
|
4975
|
+
{
|
4976
|
+
"include": "#destructuring-const"
|
4977
|
+
},
|
4978
|
+
{
|
4979
|
+
"include": "#var-single-const"
|
4980
|
+
},
|
4981
|
+
{
|
4982
|
+
"include": "#punctuation-comma"
|
4983
|
+
}
|
4984
|
+
],
|
4985
|
+
"beginCaptures": {
|
4986
|
+
"1": {
|
4987
|
+
"name": "punctuation.separator.comma.tsx"
|
4988
|
+
}
|
4989
|
+
}
|
4990
|
+
},
|
4991
|
+
{
|
4992
|
+
"include": "#punctuation-comma"
|
4993
|
+
}
|
4994
|
+
],
|
4995
|
+
"beginCaptures": {
|
4996
|
+
"1": {
|
4997
|
+
"name": "keyword.control.export.tsx"
|
4998
|
+
},
|
4999
|
+
"2": {
|
5000
|
+
"name": "storage.type.tsx"
|
5001
|
+
}
|
5002
|
+
}
|
4791
5003
|
}
|
4792
|
-
]
|
4793
|
-
|
4794
|
-
|
4795
|
-
|
5004
|
+
]
|
5005
|
+
},
|
5006
|
+
"var-single-const": {
|
5007
|
+
"patterns": [
|
5008
|
+
{
|
5009
|
+
"name": "meta.var-single-variable.expr.tsx",
|
5010
|
+
"begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ((\u003c\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: \u003c | () | (... | (param: | (param, | (param? | (param= | (param) =\u003e\n(:\\s*(\n (\u003c) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=\u003e)\n ))\n ))\n)) |\n(:\\s*((\u003c\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=\u003e|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\u003c[^\u003c\u003e]*\u003e)|[^\u003c\u003e(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ((\u003c\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
|
5011
|
+
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
|
5012
|
+
"patterns": [
|
5013
|
+
{
|
5014
|
+
"include": "#var-single-variable-type-annotation"
|
5015
|
+
}
|
5016
|
+
],
|
5017
|
+
"beginCaptures": {
|
5018
|
+
"1": {
|
5019
|
+
"name": "meta.definition.variable.tsx variable.other.constant.tsx entity.name.function.tsx"
|
5020
|
+
}
|
5021
|
+
}
|
4796
5022
|
},
|
4797
|
-
|
4798
|
-
"name": "
|
5023
|
+
{
|
5024
|
+
"name": "meta.var-single-variable.expr.tsx",
|
5025
|
+
"begin": "([_$[:alpha:]][_$[:alnum:]]*)",
|
5026
|
+
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
|
5027
|
+
"patterns": [
|
5028
|
+
{
|
5029
|
+
"include": "#var-single-variable-type-annotation"
|
5030
|
+
}
|
5031
|
+
],
|
5032
|
+
"beginCaptures": {
|
5033
|
+
"1": {
|
5034
|
+
"name": "meta.definition.variable.tsx variable.other.constant.tsx"
|
5035
|
+
}
|
5036
|
+
}
|
4799
5037
|
}
|
4800
|
-
|
5038
|
+
]
|
4801
5039
|
},
|
4802
5040
|
"var-single-variable": {
|
4803
5041
|
"patterns": [
|
4804
5042
|
{
|
4805
5043
|
"name": "meta.var-single-variable.expr.tsx",
|
4806
|
-
"begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*([\\{\\[]\\s*)?$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: \u003c | () | (... | (param: | (param, | (param? | (param= | (param) =\u003e\n(:\\s*(\n (\u003c) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=\u003e)\n ))\n ))\n)) |\n(:\\s*([\\(]\\s*([\\{\\[]\\s*)?$)) |\n(:\\s*(=\u003e|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\u003c[^\u003c\u003e]*\u003e)|[^\u003c\u003e(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*([\\{\\[]\\s*)?$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
|
5044
|
+
"begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ((\u003c\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: \u003c | () | (... | (param: | (param, | (param? | (param= | (param) =\u003e\n(:\\s*(\n (\u003c) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=\u003e)\n ))\n ))\n)) |\n(:\\s*((\u003c\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=\u003e|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\u003c[^\u003c\u003e]*\u003e)|[^\u003c\u003e(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ((\u003c\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
|
4807
5045
|
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
|
4808
5046
|
"patterns": [
|
4809
5047
|
{
|