github-linguist 7.1.3 → 7.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/grammars/annotation.liquidhaskell.haskell.json +119 -4
- data/grammars/etc.json +148 -0
- data/grammars/hint.haskell.json +119 -4
- data/grammars/hint.message.haskell.json +119 -4
- data/grammars/hint.type.haskell.json +119 -4
- data/grammars/injections.etc.json +21 -0
- data/grammars/source.abap.json +2 -2
- data/grammars/source.ats.json +87 -17
- data/grammars/source.ballerina.json +236 -313
- data/grammars/source.batchfile.json +1 -1
- data/grammars/source.bdf.json +14 -8
- data/grammars/source.changelogs.rpm-spec.json +3 -3
- data/grammars/source.chapel.json +1 -1
- data/grammars/source.coffee.json +98 -0
- data/grammars/source.csound-document.json +26 -124
- data/grammars/source.curlrc.json +180 -0
- data/grammars/source.dart.json +5 -2
- data/grammars/source.elixir.json +20 -25
- data/grammars/source.emacs.lisp.json +23 -1
- data/grammars/source.gdb.json +1 -1
- data/grammars/source.gitattributes.json +111 -0
- data/grammars/source.gitconfig.json +450 -0
- data/grammars/source.gitignore.json +140 -0
- data/grammars/source.graphql.json +18 -0
- data/grammars/source.haproxy-config.json +10 -10
- data/grammars/source.haskell.json +119 -4
- data/grammars/source.hgignore.json +34 -0
- data/grammars/source.hsig.json +119 -4
- data/grammars/source.hx.json +2 -2
- data/grammars/source.jison.json +1 -1
- data/grammars/source.ltspice.symbol.json +294 -0
- data/grammars/source.m4.json +187 -0
- data/grammars/source.man-conf.json +141 -0
- data/grammars/source.nanorc.json +330 -0
- data/grammars/source.nim.comment.json +82 -0
- data/grammars/source.nim.json +1 -57
- data/grammars/source.nix.json +2 -2
- data/grammars/source.opts.json +98 -0
- data/grammars/source.reason.json +13 -0
- data/grammars/source.rust.json +35 -0
- data/grammars/source.terraform.json +4 -1
- data/grammars/source.ts.json +307 -39
- data/grammars/source.tsx.json +290 -37
- data/grammars/source.zig.json +286 -0
- data/grammars/text.html.basic.json +1 -1
- data/grammars/text.marko.json +61 -9
- data/grammars/text.tex.latex.haskell.json +119 -4
- data/grammars/text.zone_file.json +2 -2
- data/grammars/version +1 -1
- data/lib/linguist/VERSION +1 -1
- data/lib/linguist/generated.rb +0 -8
- data/lib/linguist/heuristics.yml +30 -3
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +143 -3
- data/lib/linguist/samples.json +4494 -646
- data/lib/linguist/vendor.yml +1 -2
- metadata +31 -4
- data/grammars/source.solidity.json +0 -189
@@ -0,0 +1,82 @@
|
|
1
|
+
{
|
2
|
+
"name": "Nim Comment",
|
3
|
+
"scopeName": "source.nim.comment",
|
4
|
+
"patterns": [
|
5
|
+
{
|
6
|
+
"name": "comment.line.number-sign.multi-comment.nim",
|
7
|
+
"begin": "(?i)(\\#\\[)\\s*(todo\\b)?",
|
8
|
+
"end": "(?i)(\\]\\#)",
|
9
|
+
"patterns": [
|
10
|
+
{
|
11
|
+
"include": "$self"
|
12
|
+
}
|
13
|
+
],
|
14
|
+
"beginCaptures": {
|
15
|
+
"1": {
|
16
|
+
"name": "punctuation.definition.multi-comment.nim"
|
17
|
+
},
|
18
|
+
"2": {
|
19
|
+
"name": "invalid.illegal.TODO.nim"
|
20
|
+
}
|
21
|
+
},
|
22
|
+
"endCaptures": {
|
23
|
+
"1": {
|
24
|
+
"name": "punctuation.definition.multi-comment.nim"
|
25
|
+
}
|
26
|
+
}
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"name": "comment.line.number-sign.multi-doc-comment.nim",
|
30
|
+
"begin": "(?i)(\\#\\#\\[)\\s*(todo\\b)?",
|
31
|
+
"end": "(?i)(\\]\\#\\#)",
|
32
|
+
"patterns": [
|
33
|
+
{
|
34
|
+
"include": "$self"
|
35
|
+
}
|
36
|
+
],
|
37
|
+
"beginCaptures": {
|
38
|
+
"1": {
|
39
|
+
"name": "punctuation.definition.multi-doc-comment.nim"
|
40
|
+
},
|
41
|
+
"2": {
|
42
|
+
"name": "invalid.illegal.TODO.nim"
|
43
|
+
}
|
44
|
+
},
|
45
|
+
"endCaptures": {
|
46
|
+
"1": {
|
47
|
+
"name": "punctuation.definition.multi-doc-comment.nim"
|
48
|
+
}
|
49
|
+
}
|
50
|
+
},
|
51
|
+
{
|
52
|
+
"name": "comment.line.number-sign.doc-comment.nim",
|
53
|
+
"match": "(?i)(##\\s*)(todo\\b)?(.*$\\n?)",
|
54
|
+
"captures": {
|
55
|
+
"1": {
|
56
|
+
"name": "punctuation.definition.doc-comment.nim"
|
57
|
+
},
|
58
|
+
"2": {
|
59
|
+
"name": "invalid.illegal.TODO.nim"
|
60
|
+
},
|
61
|
+
"3": {
|
62
|
+
"name": "comment.line.number-sign.doc-comment.body.nim"
|
63
|
+
}
|
64
|
+
}
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"name": "comment.line.number-sign.comment.nim",
|
68
|
+
"match": "(?i)(#\\s*)(todo\\b)?(.*$\\n?)",
|
69
|
+
"captures": {
|
70
|
+
"1": {
|
71
|
+
"name": "punctuation.definition.comment.nim"
|
72
|
+
},
|
73
|
+
"2": {
|
74
|
+
"name": "invalid.illegal.TODO.nim"
|
75
|
+
},
|
76
|
+
"3": {
|
77
|
+
"name": "comment.line.number-sign.comment.body.nim"
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
]
|
82
|
+
}
|
data/grammars/source.nim.json
CHANGED
@@ -3,63 +3,7 @@
|
|
3
3
|
"scopeName": "source.nim",
|
4
4
|
"patterns": [
|
5
5
|
{
|
6
|
-
"
|
7
|
-
"begin": "(\\#\\[\\s*(TODO|todo)?)",
|
8
|
-
"end": "(.*]\\#)",
|
9
|
-
"captures": {
|
10
|
-
"1": {
|
11
|
-
"name": "punctuation.definition.multi-comment.nim"
|
12
|
-
},
|
13
|
-
"2": {
|
14
|
-
"name": "invalid.illegal.TODO.nim"
|
15
|
-
}
|
16
|
-
}
|
17
|
-
},
|
18
|
-
{
|
19
|
-
"name": "comment.line.number-sign.multi-doc-comment.nim",
|
20
|
-
"begin": "(\\#\\#\\[\\s*(TODO|todo)?)",
|
21
|
-
"end": "(.*]\\#\\#)",
|
22
|
-
"captures": {
|
23
|
-
"1": {
|
24
|
-
"name": "punctuation.definition.multi-doc-comment.nim"
|
25
|
-
},
|
26
|
-
"2": {
|
27
|
-
"name": "invalid.illegal.TODO.nim"
|
28
|
-
}
|
29
|
-
}
|
30
|
-
},
|
31
|
-
{
|
32
|
-
"name": "comment.line.number-sign.doc-comment.nim",
|
33
|
-
"match": "(##\\s*(TODO|todo)?).+$\\n?",
|
34
|
-
"captures": {
|
35
|
-
"1": {
|
36
|
-
"name": "punctuation.definition.doc-comment.nim"
|
37
|
-
},
|
38
|
-
"2": {
|
39
|
-
"name": "invalid.illegal.TODO.nim"
|
40
|
-
}
|
41
|
-
}
|
42
|
-
},
|
43
|
-
{
|
44
|
-
"name": "comment.line.number-sign.doc-comment.empty.nim",
|
45
|
-
"match": "(##\\s*)$\\n?",
|
46
|
-
"captures": {
|
47
|
-
"1": {
|
48
|
-
"name": "punctuation.definition.doc-comment.empty.nim"
|
49
|
-
}
|
50
|
-
}
|
51
|
-
},
|
52
|
-
{
|
53
|
-
"name": "comment.line.number-sign.comment.nim",
|
54
|
-
"match": "(#\\s*(TODO|todo)?).*$\\n?",
|
55
|
-
"captures": {
|
56
|
-
"1": {
|
57
|
-
"name": "punctuation.definition.comment.nim"
|
58
|
-
},
|
59
|
-
"2": {
|
60
|
-
"name": "invalid.illegal.TODO.nim"
|
61
|
-
}
|
62
|
-
}
|
6
|
+
"include": "source.nim.comment"
|
63
7
|
},
|
64
8
|
{
|
65
9
|
"name": "source.c.embedded.nim",
|
data/grammars/source.nix.json
CHANGED
@@ -249,7 +249,7 @@
|
|
249
249
|
"end": "(?=([\\])};]|\\b(else|then)\\b))",
|
250
250
|
"patterns": [
|
251
251
|
{
|
252
|
-
"begin": "(?=(\\s*\\}|\\\"|\\binherit\\b|\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*(\\s*\\.|\\s*=[^=])))",
|
252
|
+
"begin": "(?=(\\s*\\}|\\\"|\\binherit\\b|\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*(\\s*\\.|\\s*=[^=])|\\$\\{[a-zA-z0-9\\_\\'\\-]+\\}(\\s*\\.|\\s*=[^=])))",
|
253
253
|
"end": "(?=([\\])};,]|\\b(else|then)\\b))",
|
254
254
|
"patterns": [
|
255
255
|
{
|
@@ -1108,7 +1108,7 @@
|
|
1108
1108
|
]
|
1109
1109
|
},
|
1110
1110
|
{
|
1111
|
-
"begin": "([a-zA-Z0-9\\.\\_\\-\\+]*(\\/[a-zA-Z0-9\\.\\_\\-\\+]+)+)",
|
1111
|
+
"begin": "(~?[a-zA-Z0-9\\.\\_\\-\\+]*(\\/[a-zA-Z0-9\\.\\_\\-\\+]+)+)",
|
1112
1112
|
"end": "(?=([\\])};,]|\\b(else|then)\\b))",
|
1113
1113
|
"patterns": [
|
1114
1114
|
{
|
@@ -0,0 +1,98 @@
|
|
1
|
+
{
|
2
|
+
"name": "Option list",
|
3
|
+
"scopeName": "source.opts",
|
4
|
+
"patterns": [
|
5
|
+
{
|
6
|
+
"include": "#main"
|
7
|
+
}
|
8
|
+
],
|
9
|
+
"repository": {
|
10
|
+
"escape": {
|
11
|
+
"patterns": [
|
12
|
+
{
|
13
|
+
"include": "etc#esc"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"name": "constant.character.percent.url-encoded.opts",
|
17
|
+
"match": "(%)[A-Fa-f0-9]{2}",
|
18
|
+
"captures": {
|
19
|
+
"1": {
|
20
|
+
"name": "punctuation.definition.character.percentage.opts"
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
]
|
25
|
+
},
|
26
|
+
"main": {
|
27
|
+
"patterns": [
|
28
|
+
{
|
29
|
+
"include": "etc#comment"
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"include": "#option"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"include": "#escape"
|
36
|
+
}
|
37
|
+
]
|
38
|
+
},
|
39
|
+
"option": {
|
40
|
+
"patterns": [
|
41
|
+
{
|
42
|
+
"name": "meta.option.opts",
|
43
|
+
"begin": "(--|-)([^-\\s=][^\\s=]*)",
|
44
|
+
"end": "(?!\\G)(?=\\$|\\S)",
|
45
|
+
"patterns": [
|
46
|
+
{
|
47
|
+
"match": "(?xi)\n(?\u003c= # HACK: Fixed-width look-behinds enforced by Oniguruma\n\t\\w[-_]pattern \\G\n\t| reg[-_]exp \\G\n\t| regexp \\G\n\t| reg[-_]ex \\G\n\t| regex \\G\n) \\s+ (\\S+)",
|
48
|
+
"captures": {
|
49
|
+
"1": {
|
50
|
+
"patterns": [
|
51
|
+
{
|
52
|
+
"include": "source.regexp"
|
53
|
+
}
|
54
|
+
]
|
55
|
+
}
|
56
|
+
}
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"match": "\\G(=)(\\S*)",
|
60
|
+
"captures": {
|
61
|
+
"1": {
|
62
|
+
"name": "etc#eql"
|
63
|
+
},
|
64
|
+
"2": {
|
65
|
+
"patterns": [
|
66
|
+
{
|
67
|
+
"include": "etc"
|
68
|
+
}
|
69
|
+
]
|
70
|
+
}
|
71
|
+
}
|
72
|
+
},
|
73
|
+
{
|
74
|
+
"match": "\\G\\s+(?!#|-)(\\S+)",
|
75
|
+
"captures": {
|
76
|
+
"1": {
|
77
|
+
"patterns": [
|
78
|
+
{
|
79
|
+
"include": "etc"
|
80
|
+
}
|
81
|
+
]
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
],
|
86
|
+
"beginCaptures": {
|
87
|
+
"1": {
|
88
|
+
"name": "punctuation.definition.dash.option.name.opts"
|
89
|
+
},
|
90
|
+
"2": {
|
91
|
+
"name": "entity.option.name.opts"
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
95
|
+
]
|
96
|
+
}
|
97
|
+
}
|
98
|
+
}
|
data/grammars/source.reason.json
CHANGED
@@ -140,6 +140,9 @@
|
|
140
140
|
"comment": {
|
141
141
|
"name": "comment",
|
142
142
|
"patterns": [
|
143
|
+
{
|
144
|
+
"include": "#comment-line"
|
145
|
+
},
|
143
146
|
{
|
144
147
|
"include": "#comment-block-doc"
|
145
148
|
},
|
@@ -168,6 +171,16 @@
|
|
168
171
|
}
|
169
172
|
]
|
170
173
|
},
|
174
|
+
"comment-line": {
|
175
|
+
"name": "comment.line",
|
176
|
+
"begin": "(^[ \\t]+)?((//))",
|
177
|
+
"end": "(?=^)",
|
178
|
+
"patterns": [
|
179
|
+
{
|
180
|
+
"include": "#comment"
|
181
|
+
}
|
182
|
+
]
|
183
|
+
},
|
171
184
|
"condition-lhs": {
|
172
185
|
"begin": "(?\u003c![#\\-:!?.@*/\u0026%^+\u003c=\u003e|~$\\\\])([\\?])(?![#\\-:!?.@*/\u0026%^+\u003c=\u003e|~$\\\\])",
|
173
186
|
"end": "(?=[\\)])",
|
data/grammars/source.rust.json
CHANGED
@@ -18,6 +18,9 @@
|
|
18
18
|
{
|
19
19
|
"include": "#mut"
|
20
20
|
},
|
21
|
+
{
|
22
|
+
"include": "#dyn"
|
23
|
+
},
|
21
24
|
{
|
22
25
|
"include": "#ref_lifetime"
|
23
26
|
},
|
@@ -160,6 +163,12 @@
|
|
160
163
|
{
|
161
164
|
"include": "#mut"
|
162
165
|
},
|
166
|
+
{
|
167
|
+
"include": "#dyn"
|
168
|
+
},
|
169
|
+
{
|
170
|
+
"include": "#impl"
|
171
|
+
},
|
163
172
|
{
|
164
173
|
"include": "#box"
|
165
174
|
},
|
@@ -281,6 +290,12 @@
|
|
281
290
|
{
|
282
291
|
"include": "#mut"
|
283
292
|
},
|
293
|
+
{
|
294
|
+
"include": "#dyn"
|
295
|
+
},
|
296
|
+
{
|
297
|
+
"include": "#impl"
|
298
|
+
},
|
284
299
|
{
|
285
300
|
"include": "#ref_lifetime"
|
286
301
|
},
|
@@ -379,6 +394,12 @@
|
|
379
394
|
{
|
380
395
|
"include": "#mut"
|
381
396
|
},
|
397
|
+
{
|
398
|
+
"include": "#dyn"
|
399
|
+
},
|
400
|
+
{
|
401
|
+
"include": "#impl"
|
402
|
+
},
|
382
403
|
{
|
383
404
|
"include": "#lifetime"
|
384
405
|
},
|
@@ -465,10 +486,18 @@
|
|
465
486
|
"name": "support.constant.core.rust",
|
466
487
|
"match": "\\b(Some|None|Ok|Err)\\b"
|
467
488
|
},
|
489
|
+
"dyn": {
|
490
|
+
"name": "storage.modifier.dyn.rust",
|
491
|
+
"match": "\\bdyn\\b"
|
492
|
+
},
|
468
493
|
"escaped_character": {
|
469
494
|
"name": "constant.character.escape.rust",
|
470
495
|
"match": "\\\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)"
|
471
496
|
},
|
497
|
+
"impl": {
|
498
|
+
"name": "storage.modifier.impl.rust",
|
499
|
+
"match": "\\bimpl\\b"
|
500
|
+
},
|
472
501
|
"lifetime": {
|
473
502
|
"name": "storage.modifier.lifetime.rust",
|
474
503
|
"match": "'([a-zA-Z_][a-zA-Z0-9_]*)\\b",
|
@@ -559,6 +588,12 @@
|
|
559
588
|
{
|
560
589
|
"include": "#mut"
|
561
590
|
},
|
591
|
+
{
|
592
|
+
"include": "#dyn"
|
593
|
+
},
|
594
|
+
{
|
595
|
+
"include": "#impl"
|
596
|
+
},
|
562
597
|
{
|
563
598
|
"include": "#lifetime"
|
564
599
|
},
|
@@ -196,6 +196,9 @@
|
|
196
196
|
},
|
197
197
|
{
|
198
198
|
"include": "#string_interpolation_keywords"
|
199
|
+
},
|
200
|
+
{
|
201
|
+
"include": "#strings"
|
199
202
|
}
|
200
203
|
],
|
201
204
|
"beginCaptures": {
|
@@ -229,7 +232,7 @@
|
|
229
232
|
},
|
230
233
|
{
|
231
234
|
"name": "string.quoted.double.terraform",
|
232
|
-
"match": "([\\w\\-\\/\\._
|
235
|
+
"match": "([\\w\\-\\/\\._\\\\%\\(\\)]+)"
|
233
236
|
}
|
234
237
|
],
|
235
238
|
"beginCaptures": {
|
data/grammars/source.ts.json
CHANGED
@@ -132,7 +132,7 @@
|
|
132
132
|
},
|
133
133
|
{
|
134
134
|
"name": "meta.arrow.ts",
|
135
|
-
"begin": "(?x) (?:\n (?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(\\basync)\n)? ((?\u003c![})!\\]])\\s*\n (?=\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)",
|
135
|
+
"begin": "(?x) (?:\n (?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(\\basync)\n)? ((?\u003c![})!\\]])\\s*\n (?=\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)\\{\\}]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=\u003e # arrow operator\n)\n )\n)",
|
136
136
|
"end": "(?==\u003e|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
|
137
137
|
"patterns": [
|
138
138
|
{
|
@@ -226,6 +226,12 @@
|
|
226
226
|
{
|
227
227
|
"include": "#string"
|
228
228
|
},
|
229
|
+
{
|
230
|
+
"include": "#numeric-literal"
|
231
|
+
},
|
232
|
+
{
|
233
|
+
"include": "#regex"
|
234
|
+
},
|
229
235
|
{
|
230
236
|
"include": "#object-binding-pattern"
|
231
237
|
},
|
@@ -248,6 +254,12 @@
|
|
248
254
|
{
|
249
255
|
"include": "#string"
|
250
256
|
},
|
257
|
+
{
|
258
|
+
"include": "#numeric-literal"
|
259
|
+
},
|
260
|
+
{
|
261
|
+
"include": "#regex"
|
262
|
+
},
|
251
263
|
{
|
252
264
|
"include": "#object-binding-pattern-const"
|
253
265
|
},
|
@@ -298,10 +310,25 @@
|
|
298
310
|
},
|
299
311
|
"cast": {
|
300
312
|
"patterns": [
|
313
|
+
{
|
314
|
+
"name": "cast.expr.ts",
|
315
|
+
"match": "\\s*(\u003c)\\s*(const)\\s*(\u003e)",
|
316
|
+
"captures": {
|
317
|
+
"1": {
|
318
|
+
"name": "meta.brace.angle.ts"
|
319
|
+
},
|
320
|
+
"2": {
|
321
|
+
"name": "storage.modifier.ts"
|
322
|
+
},
|
323
|
+
"3": {
|
324
|
+
"name": "meta.brace.angle.ts"
|
325
|
+
}
|
326
|
+
}
|
327
|
+
},
|
301
328
|
{
|
302
329
|
"name": "cast.expr.ts",
|
303
330
|
"begin": "(?:(?\u003c!\\+\\+|--)(?\u003c=^return|[^\\._$[:alnum:]]return|^throw|[^\\._$[:alnum:]]throw|^yield|[^\\._$[:alnum:]]yield|^await|[^\\._$[:alnum:]]await|^default|[^\\._$[:alnum:]]default|[=(,:\u003e*?\\\u0026\\|\\^]|[^_$[:alnum:]](?:\\+\\+|\\-\\-)|[^\\+]\\+|[^\\-]\\-))\\s*(\u003c)(?!\u003c?\\=)(?!\\s*$)",
|
304
|
-
"end": "(\\\u003e)
|
331
|
+
"end": "(\\\u003e)",
|
305
332
|
"patterns": [
|
306
333
|
{
|
307
334
|
"include": "#type"
|
@@ -321,7 +348,7 @@
|
|
321
348
|
{
|
322
349
|
"name": "cast.expr.ts",
|
323
350
|
"begin": "(?:(?\u003c=^))\\s*(\u003c)(?=[_$[:alpha:]][_$[:alnum:]]*\\s*\u003e)",
|
324
|
-
"end": "(\\\u003e)
|
351
|
+
"end": "(\\\u003e)",
|
325
352
|
"patterns": [
|
326
353
|
{
|
327
354
|
"include": "#type"
|
@@ -1229,6 +1256,17 @@
|
|
1229
1256
|
},
|
1230
1257
|
{
|
1231
1258
|
"include": "#inline-tags"
|
1259
|
+
},
|
1260
|
+
{
|
1261
|
+
"match": "((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\\s+)",
|
1262
|
+
"captures": {
|
1263
|
+
"1": {
|
1264
|
+
"name": "storage.type.class.jsdoc"
|
1265
|
+
},
|
1266
|
+
"2": {
|
1267
|
+
"name": "punctuation.definition.block.tag.jsdoc"
|
1268
|
+
}
|
1269
|
+
}
|
1232
1270
|
}
|
1233
1271
|
]
|
1234
1272
|
},
|
@@ -1395,7 +1433,74 @@
|
|
1395
1433
|
"include": "#expressionWithoutIdentifiers"
|
1396
1434
|
},
|
1397
1435
|
{
|
1398
|
-
"include": "#
|
1436
|
+
"include": "#comment"
|
1437
|
+
},
|
1438
|
+
{
|
1439
|
+
"include": "#string"
|
1440
|
+
},
|
1441
|
+
{
|
1442
|
+
"include": "#decorator"
|
1443
|
+
},
|
1444
|
+
{
|
1445
|
+
"include": "#destructuring-parameter"
|
1446
|
+
},
|
1447
|
+
{
|
1448
|
+
"match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(public|protected|private|readonly)\\s+(?=(public|protected|private|readonly)\\s+)",
|
1449
|
+
"captures": {
|
1450
|
+
"1": {
|
1451
|
+
"name": "storage.modifier.ts"
|
1452
|
+
}
|
1453
|
+
}
|
1454
|
+
},
|
1455
|
+
{
|
1456
|
+
"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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)\\{\\}]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
|
1457
|
+
"captures": {
|
1458
|
+
"1": {
|
1459
|
+
"name": "storage.modifier.ts"
|
1460
|
+
},
|
1461
|
+
"2": {
|
1462
|
+
"name": "keyword.operator.rest.ts"
|
1463
|
+
},
|
1464
|
+
"3": {
|
1465
|
+
"name": "entity.name.function.ts variable.language.this.ts"
|
1466
|
+
},
|
1467
|
+
"4": {
|
1468
|
+
"name": "entity.name.function.ts"
|
1469
|
+
},
|
1470
|
+
"5": {
|
1471
|
+
"name": "keyword.operator.optional.ts"
|
1472
|
+
}
|
1473
|
+
}
|
1474
|
+
},
|
1475
|
+
{
|
1476
|
+
"match": "(?x)(?:(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?\u003c!=|:)(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*:)",
|
1477
|
+
"captures": {
|
1478
|
+
"1": {
|
1479
|
+
"name": "storage.modifier.ts"
|
1480
|
+
},
|
1481
|
+
"2": {
|
1482
|
+
"name": "keyword.operator.rest.ts"
|
1483
|
+
},
|
1484
|
+
"3": {
|
1485
|
+
"name": "variable.parameter.ts variable.language.this.ts"
|
1486
|
+
},
|
1487
|
+
"4": {
|
1488
|
+
"name": "variable.parameter.ts"
|
1489
|
+
},
|
1490
|
+
"5": {
|
1491
|
+
"name": "keyword.operator.optional.ts"
|
1492
|
+
}
|
1493
|
+
}
|
1494
|
+
},
|
1495
|
+
{
|
1496
|
+
"include": "#type-annotation"
|
1497
|
+
},
|
1498
|
+
{
|
1499
|
+
"include": "#variable-initializer"
|
1500
|
+
},
|
1501
|
+
{
|
1502
|
+
"name": "punctuation.separator.parameter.ts",
|
1503
|
+
"match": ","
|
1399
1504
|
},
|
1400
1505
|
{
|
1401
1506
|
"include": "#identifiers"
|
@@ -1468,6 +1573,17 @@
|
|
1468
1573
|
"name": "keyword.operator.expression.void.ts",
|
1469
1574
|
"match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))void(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
|
1470
1575
|
},
|
1576
|
+
{
|
1577
|
+
"match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(as)\\s+(const)(?=\\s*($|[;,:})\\]]))",
|
1578
|
+
"captures": {
|
1579
|
+
"1": {
|
1580
|
+
"name": "keyword.control.as.ts"
|
1581
|
+
},
|
1582
|
+
"2": {
|
1583
|
+
"name": "storage.modifier.ts"
|
1584
|
+
}
|
1585
|
+
}
|
1586
|
+
},
|
1471
1587
|
{
|
1472
1588
|
"begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(as)\\s+",
|
1473
1589
|
"end": "(?=$|^|[;,:})\\]]|((?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(as)\\s+)|(\\s+\\\u003c))",
|
@@ -1607,8 +1723,8 @@
|
|
1607
1723
|
},
|
1608
1724
|
"field-declaration": {
|
1609
1725
|
"name": "meta.field.declaration.ts",
|
1610
|
-
"begin": "(?x)(?\u003c!\\()(?:(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(readonly)\\s+)?(?=\\s*((\\b(?\u003c!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?\u003c!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?\u003c!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?\u003c!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\`([^\\`\\\\]|\\\\\\`|\\\\)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(
|
1611
|
-
"end": "(?x)(?=\\}|;|,|$|(^(?!\\s*((\\b(?\u003c!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?\u003c!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?\u003c!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?\u003c!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\`([^\\`\\\\]|\\\\\\`|\\\\)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(
|
1726
|
+
"begin": "(?x)(?\u003c!\\()(?:(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(readonly)\\s+)?(?=\\s*((\\b(?\u003c!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?\u003c!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?\u003c!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?\u003c!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\`([^\\`\\\\]|\\\\\\`|\\\\)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(?:(?:(\\?)|(\\!))\\s*)?(=|:|;|,|$))",
|
1727
|
+
"end": "(?x)(?=\\}|;|,|$|(^(?!\\s*((\\b(?\u003c!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?\u003c!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?\u003c!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?\u003c!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\`([^\\`\\\\]|\\\\\\`|\\\\)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(?:(?:(\\?)|(\\!))\\s*)?(=|:|;|,|$))))|(?\u003c=\\})",
|
1612
1728
|
"patterns": [
|
1613
1729
|
{
|
1614
1730
|
"include": "#variable-initializer"
|
@@ -1629,13 +1745,16 @@
|
|
1629
1745
|
"include": "#comment"
|
1630
1746
|
},
|
1631
1747
|
{
|
1632
|
-
"match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\?)?(
|
1748
|
+
"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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)\\{\\}]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
|
1633
1749
|
"captures": {
|
1634
1750
|
"1": {
|
1635
1751
|
"name": "meta.definition.property.ts entity.name.function.ts"
|
1636
1752
|
},
|
1637
1753
|
"2": {
|
1638
1754
|
"name": "keyword.operator.optional.ts"
|
1755
|
+
},
|
1756
|
+
"3": {
|
1757
|
+
"name": "keyword.operator.definiteassignment.ts"
|
1639
1758
|
}
|
1640
1759
|
}
|
1641
1760
|
},
|
@@ -1646,6 +1765,10 @@
|
|
1646
1765
|
{
|
1647
1766
|
"name": "keyword.operator.optional.ts",
|
1648
1767
|
"match": "\\?"
|
1768
|
+
},
|
1769
|
+
{
|
1770
|
+
"name": "keyword.operator.definiteassignment.ts",
|
1771
|
+
"match": "\\!"
|
1649
1772
|
}
|
1650
1773
|
],
|
1651
1774
|
"beginCaptures": {
|
@@ -1721,13 +1844,13 @@
|
|
1721
1844
|
]
|
1722
1845
|
},
|
1723
1846
|
"function-call": {
|
1724
|
-
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?\\.\\s*)?(\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(
|
1725
|
-
"end": "(?\u003c=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?\\.\\s*)?(\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(
|
1847
|
+
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?\\.\\s*)?(\u003c\\s*(((keyof|infer|typeof)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer|typeof)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))(([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer|typeof)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(?\u003c!=)\\\u003e))*(?\u003c!=)\\\u003e)*(?\u003c!=)\u003e\\s*)?\\()",
|
1848
|
+
"end": "(?\u003c=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?\\.\\s*)?(\u003c\\s*(((keyof|infer|typeof)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer|typeof)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))(([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer|typeof)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(?\u003c!=)\\\u003e))*(?\u003c!=)\\\u003e)*(?\u003c!=)\u003e\\s*)?\\()",
|
1726
1849
|
"patterns": [
|
1727
1850
|
{
|
1728
1851
|
"name": "meta.function-call.ts",
|
1729
1852
|
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))",
|
1730
|
-
"end": "(?=\\s*(\\?\\.\\s*)?(\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(
|
1853
|
+
"end": "(?=\\s*(\\?\\.\\s*)?(\u003c\\s*(((keyof|infer|typeof)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer|typeof)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))(([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer|typeof)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(?\u003c!=)\\\u003e))*(?\u003c!=)\\\u003e)*(?\u003c!=)\u003e\\s*)?\\()",
|
1731
1854
|
"patterns": [
|
1732
1855
|
{
|
1733
1856
|
"include": "#literal"
|
@@ -1871,7 +1994,7 @@
|
|
1871
1994
|
"include": "#parameter-name"
|
1872
1995
|
},
|
1873
1996
|
{
|
1874
|
-
"include": "#type-annotation"
|
1997
|
+
"include": "#parameter-type-annotation"
|
1875
1998
|
},
|
1876
1999
|
{
|
1877
2000
|
"include": "#variable-initializer"
|
@@ -1888,7 +2011,7 @@
|
|
1888
2011
|
"include": "#object-identifiers"
|
1889
2012
|
},
|
1890
2013
|
{
|
1891
|
-
"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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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))",
|
2014
|
+
"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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)\\{\\}]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n))",
|
1892
2015
|
"captures": {
|
1893
2016
|
"1": {
|
1894
2017
|
"name": "punctuation.accessor.ts"
|
@@ -2951,8 +3074,8 @@
|
|
2951
3074
|
},
|
2952
3075
|
{
|
2953
3076
|
"name": "meta.object.member.ts meta.object-literal.key.ts",
|
2954
|
-
"begin": "(?=[\\'\\\"])",
|
2955
|
-
"end": "(?=:)|((?\u003c=[\\'\\\"])(
|
3077
|
+
"begin": "(?=[\\'\\\"\\`])",
|
3078
|
+
"end": "(?=:)|((?\u003c=[\\'\\\"\\`])(?=((\\s*[\\(\\\u003c,}])|(\\s+(as)\\s+))))",
|
2956
3079
|
"patterns": [
|
2957
3080
|
{
|
2958
3081
|
"include": "#comment"
|
@@ -2962,9 +3085,22 @@
|
|
2962
3085
|
}
|
2963
3086
|
]
|
2964
3087
|
},
|
3088
|
+
{
|
3089
|
+
"name": "meta.object.member.ts meta.object-literal.key.ts",
|
3090
|
+
"begin": "(?x)(?=(\\b(?\u003c!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?\u003c!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?\u003c!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?\u003c!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$)))",
|
3091
|
+
"end": "(?=:)|(?=\\s*([\\(\\\u003c,}])|(\\s+as\\s+))",
|
3092
|
+
"patterns": [
|
3093
|
+
{
|
3094
|
+
"include": "#comment"
|
3095
|
+
},
|
3096
|
+
{
|
3097
|
+
"include": "#numeric-literal"
|
3098
|
+
}
|
3099
|
+
]
|
3100
|
+
},
|
2965
3101
|
{
|
2966
3102
|
"name": "meta.method.declaration.ts",
|
2967
|
-
"begin": "(?\u003c=[\\]\\'\\\"])(?=\\s*[\\(\\\u003c])",
|
3103
|
+
"begin": "(?\u003c=[\\]\\'\\\"\\`])(?=\\s*[\\(\\\u003c])",
|
2968
3104
|
"end": "(?=\\}|;|,)|(?\u003c=\\})",
|
2969
3105
|
"patterns": [
|
2970
3106
|
{
|
@@ -2986,7 +3122,7 @@
|
|
2986
3122
|
},
|
2987
3123
|
{
|
2988
3124
|
"name": "meta.object.member.ts",
|
2989
|
-
"match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ((\u003c\\s*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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)))",
|
3125
|
+
"match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ((\u003c\\s*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)\\{\\}]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
|
2990
3126
|
"captures": {
|
2991
3127
|
"0": {
|
2992
3128
|
"name": "meta.object-literal.key.ts"
|
@@ -3029,6 +3165,33 @@
|
|
3029
3165
|
}
|
3030
3166
|
}
|
3031
3167
|
},
|
3168
|
+
{
|
3169
|
+
"name": "meta.object.member.ts",
|
3170
|
+
"match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(as)\\s+(const)(?=\\s*([,}]|$))",
|
3171
|
+
"captures": {
|
3172
|
+
"1": {
|
3173
|
+
"name": "keyword.control.as.ts"
|
3174
|
+
},
|
3175
|
+
"2": {
|
3176
|
+
"name": "storage.modifier.ts"
|
3177
|
+
}
|
3178
|
+
}
|
3179
|
+
},
|
3180
|
+
{
|
3181
|
+
"name": "meta.object.member.ts",
|
3182
|
+
"begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(as)\\s+",
|
3183
|
+
"end": "(?=$|^|[,}]|((?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(as)\\s+))",
|
3184
|
+
"patterns": [
|
3185
|
+
{
|
3186
|
+
"include": "#type"
|
3187
|
+
}
|
3188
|
+
],
|
3189
|
+
"beginCaptures": {
|
3190
|
+
"1": {
|
3191
|
+
"name": "keyword.control.as.ts"
|
3192
|
+
}
|
3193
|
+
}
|
3194
|
+
},
|
3032
3195
|
{
|
3033
3196
|
"name": "meta.object.member.ts",
|
3034
3197
|
"begin": "(?=[_$[:alpha:]][_$[:alnum:]]*\\s*=)",
|
@@ -3147,6 +3310,12 @@
|
|
3147
3310
|
{
|
3148
3311
|
"include": "#string"
|
3149
3312
|
},
|
3313
|
+
{
|
3314
|
+
"include": "#numeric-literal"
|
3315
|
+
},
|
3316
|
+
{
|
3317
|
+
"include": "#regex"
|
3318
|
+
},
|
3150
3319
|
{
|
3151
3320
|
"include": "#parameter-object-binding-pattern"
|
3152
3321
|
},
|
@@ -3172,7 +3341,7 @@
|
|
3172
3341
|
}
|
3173
3342
|
},
|
3174
3343
|
{
|
3175
|
-
"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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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)))",
|
3344
|
+
"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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\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
3345
|
"captures": {
|
3177
3346
|
"1": {
|
3178
3347
|
"name": "storage.modifier.ts"
|
@@ -3266,6 +3435,25 @@
|
|
3266
3435
|
}
|
3267
3436
|
}
|
3268
3437
|
},
|
3438
|
+
"parameter-type-annotation": {
|
3439
|
+
"patterns": [
|
3440
|
+
{
|
3441
|
+
"name": "meta.type.annotation.ts",
|
3442
|
+
"begin": "(:)",
|
3443
|
+
"end": "(?=[,)])|(?==[^\u003e])",
|
3444
|
+
"patterns": [
|
3445
|
+
{
|
3446
|
+
"include": "#type"
|
3447
|
+
}
|
3448
|
+
],
|
3449
|
+
"beginCaptures": {
|
3450
|
+
"1": {
|
3451
|
+
"name": "keyword.operator.type.annotation.ts"
|
3452
|
+
}
|
3453
|
+
}
|
3454
|
+
}
|
3455
|
+
]
|
3456
|
+
},
|
3269
3457
|
"paren-expression": {
|
3270
3458
|
"begin": "\\(",
|
3271
3459
|
"end": "\\)",
|
@@ -4099,7 +4287,7 @@
|
|
4099
4287
|
"patterns": [
|
4100
4288
|
{
|
4101
4289
|
"name": "string.template.ts",
|
4102
|
-
"begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(
|
4290
|
+
"begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\u003c\\s*(((keyof|infer|typeof)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer|typeof)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))(([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer|typeof)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(?\u003c!=)\\\u003e))*(?\u003c!=)\\\u003e)*(?\u003c!=)\u003e\\s*)`)",
|
4103
4291
|
"end": "(?=`)",
|
4104
4292
|
"patterns": [
|
4105
4293
|
{
|
@@ -4202,7 +4390,7 @@
|
|
4202
4390
|
"include": "#type-builtin-literals"
|
4203
4391
|
},
|
4204
4392
|
{
|
4205
|
-
"include": "#type-
|
4393
|
+
"include": "#type-parameters"
|
4206
4394
|
},
|
4207
4395
|
{
|
4208
4396
|
"include": "#type-tuple"
|
@@ -4225,6 +4413,10 @@
|
|
4225
4413
|
{
|
4226
4414
|
"include": "#type-function-return-type"
|
4227
4415
|
},
|
4416
|
+
{
|
4417
|
+
"name": "storage.modifier.ts",
|
4418
|
+
"match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(readonly)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
|
4419
|
+
},
|
4228
4420
|
{
|
4229
4421
|
"include": "#type-name"
|
4230
4422
|
}
|
@@ -4309,6 +4501,23 @@
|
|
4309
4501
|
"name": "meta.type.parameters.ts",
|
4310
4502
|
"begin": "\\\u003c",
|
4311
4503
|
"end": "\\\u003e",
|
4504
|
+
"patterns": [
|
4505
|
+
{
|
4506
|
+
"include": "#type-arguments-body"
|
4507
|
+
}
|
4508
|
+
],
|
4509
|
+
"beginCaptures": {
|
4510
|
+
"0": {
|
4511
|
+
"name": "punctuation.definition.typeparameters.begin.ts"
|
4512
|
+
}
|
4513
|
+
},
|
4514
|
+
"endCaptures": {
|
4515
|
+
"0": {
|
4516
|
+
"name": "punctuation.definition.typeparameters.end.ts"
|
4517
|
+
}
|
4518
|
+
}
|
4519
|
+
},
|
4520
|
+
"type-arguments-body": {
|
4312
4521
|
"patterns": [
|
4313
4522
|
{
|
4314
4523
|
"match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(_)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
|
@@ -4324,17 +4533,7 @@
|
|
4324
4533
|
{
|
4325
4534
|
"include": "#punctuation-comma"
|
4326
4535
|
}
|
4327
|
-
]
|
4328
|
-
"beginCaptures": {
|
4329
|
-
"0": {
|
4330
|
-
"name": "punctuation.definition.typeparameters.begin.ts"
|
4331
|
-
}
|
4332
|
-
},
|
4333
|
-
"endCaptures": {
|
4334
|
-
"0": {
|
4335
|
-
"name": "punctuation.definition.typeparameters.end.ts"
|
4336
|
-
}
|
4337
|
-
}
|
4536
|
+
]
|
4338
4537
|
},
|
4339
4538
|
"type-builtin-literals": {
|
4340
4539
|
"name": "support.type.builtin.ts",
|
@@ -4380,11 +4579,19 @@
|
|
4380
4579
|
"type-fn-type-parameters": {
|
4381
4580
|
"patterns": [
|
4382
4581
|
{
|
4383
|
-
"
|
4384
|
-
"
|
4385
|
-
"
|
4582
|
+
"begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(new)\\b(?=\\s*\\\u003c)",
|
4583
|
+
"end": "(?\u003c=\u003e)",
|
4584
|
+
"patterns": [
|
4585
|
+
{
|
4586
|
+
"include": "#comment"
|
4587
|
+
},
|
4588
|
+
{
|
4589
|
+
"include": "#type-parameters"
|
4590
|
+
}
|
4591
|
+
],
|
4592
|
+
"beginCaptures": {
|
4386
4593
|
"1": {
|
4387
|
-
"name": "keyword.control.new.ts"
|
4594
|
+
"name": "meta.type.constructor.ts keyword.control.new.ts"
|
4388
4595
|
}
|
4389
4596
|
}
|
4390
4597
|
},
|
@@ -4473,6 +4680,58 @@
|
|
4473
4680
|
},
|
4474
4681
|
"type-name": {
|
4475
4682
|
"patterns": [
|
4683
|
+
{
|
4684
|
+
"contentName": "meta.type.parameters.ts",
|
4685
|
+
"begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\u003c)",
|
4686
|
+
"end": "(\u003e)",
|
4687
|
+
"patterns": [
|
4688
|
+
{
|
4689
|
+
"include": "#type-arguments-body"
|
4690
|
+
}
|
4691
|
+
],
|
4692
|
+
"captures": {
|
4693
|
+
"1": {
|
4694
|
+
"name": "entity.name.type.module.ts"
|
4695
|
+
},
|
4696
|
+
"2": {
|
4697
|
+
"name": "punctuation.accessor.ts"
|
4698
|
+
},
|
4699
|
+
"3": {
|
4700
|
+
"name": "punctuation.accessor.optional.ts"
|
4701
|
+
},
|
4702
|
+
"4": {
|
4703
|
+
"name": "meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts"
|
4704
|
+
}
|
4705
|
+
},
|
4706
|
+
"endCaptures": {
|
4707
|
+
"1": {
|
4708
|
+
"name": "meta.type.parameters.ts punctuation.definition.typeparameters.end.ts"
|
4709
|
+
}
|
4710
|
+
}
|
4711
|
+
},
|
4712
|
+
{
|
4713
|
+
"contentName": "meta.type.parameters.ts",
|
4714
|
+
"begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\u003c)",
|
4715
|
+
"end": "(\u003e)",
|
4716
|
+
"patterns": [
|
4717
|
+
{
|
4718
|
+
"include": "#type-arguments-body"
|
4719
|
+
}
|
4720
|
+
],
|
4721
|
+
"beginCaptures": {
|
4722
|
+
"1": {
|
4723
|
+
"name": "entity.name.type.ts"
|
4724
|
+
},
|
4725
|
+
"2": {
|
4726
|
+
"name": "meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts"
|
4727
|
+
}
|
4728
|
+
},
|
4729
|
+
"endCaptures": {
|
4730
|
+
"1": {
|
4731
|
+
"name": "meta.type.parameters.ts punctuation.definition.typeparameters.end.ts"
|
4732
|
+
}
|
4733
|
+
}
|
4734
|
+
},
|
4476
4735
|
{
|
4477
4736
|
"match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))",
|
4478
4737
|
"captures": {
|
@@ -4882,7 +5141,7 @@
|
|
4882
5141
|
"patterns": [
|
4883
5142
|
{
|
4884
5143
|
"name": "meta.var-single-variable.expr.ts",
|
4885
|
-
"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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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)))",
|
5144
|
+
"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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)\\{\\}]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
|
4886
5145
|
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
|
4887
5146
|
"patterns": [
|
4888
5147
|
{
|
@@ -4916,7 +5175,7 @@
|
|
4916
5175
|
"patterns": [
|
4917
5176
|
{
|
4918
5177
|
"name": "meta.var-single-variable.expr.ts",
|
4919
|
-
"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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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)))",
|
5178
|
+
"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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*$)|((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\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*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)\\{\\}]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
|
4920
5179
|
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
|
4921
5180
|
"patterns": [
|
4922
5181
|
{
|
@@ -4926,12 +5185,15 @@
|
|
4926
5185
|
"beginCaptures": {
|
4927
5186
|
"1": {
|
4928
5187
|
"name": "meta.definition.variable.ts entity.name.function.ts"
|
5188
|
+
},
|
5189
|
+
"2": {
|
5190
|
+
"name": "keyword.operator.definiteassignment.ts"
|
4929
5191
|
}
|
4930
5192
|
}
|
4931
5193
|
},
|
4932
5194
|
{
|
4933
5195
|
"name": "meta.var-single-variable.expr.ts",
|
4934
|
-
"begin": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
|
5196
|
+
"begin": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])(\\!)?",
|
4935
5197
|
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
|
4936
5198
|
"patterns": [
|
4937
5199
|
{
|
@@ -4941,12 +5203,15 @@
|
|
4941
5203
|
"beginCaptures": {
|
4942
5204
|
"1": {
|
4943
5205
|
"name": "meta.definition.variable.ts variable.other.constant.ts"
|
5206
|
+
},
|
5207
|
+
"2": {
|
5208
|
+
"name": "keyword.operator.definiteassignment.ts"
|
4944
5209
|
}
|
4945
5210
|
}
|
4946
5211
|
},
|
4947
5212
|
{
|
4948
5213
|
"name": "meta.var-single-variable.expr.ts",
|
4949
|
-
"begin": "([_$[:alpha:]][_$[:alnum:]]*)",
|
5214
|
+
"begin": "([_$[:alpha:]][_$[:alnum:]]*)(\\!)?",
|
4950
5215
|
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
|
4951
5216
|
"patterns": [
|
4952
5217
|
{
|
@@ -4956,6 +5221,9 @@
|
|
4956
5221
|
"beginCaptures": {
|
4957
5222
|
"1": {
|
4958
5223
|
"name": "meta.definition.variable.ts variable.other.readwrite.ts"
|
5224
|
+
},
|
5225
|
+
"2": {
|
5226
|
+
"name": "keyword.operator.definiteassignment.ts"
|
4959
5227
|
}
|
4960
5228
|
}
|
4961
5229
|
}
|
@@ -4977,7 +5245,7 @@
|
|
4977
5245
|
"variable-initializer": {
|
4978
5246
|
"patterns": [
|
4979
5247
|
{
|
4980
|
-
"begin": "(?\u003c!=|!)(=)(?!=)(?=\\s*\\S)",
|
5248
|
+
"begin": "(?\u003c!=|!)(=)(?!=)(?=\\s*\\S)(?!\\s*.*=\u003e\\s*$)",
|
4981
5249
|
"end": "(?=$|^|[,);}\\]]|(\\s+(of|in)\\s+))",
|
4982
5250
|
"patterns": [
|
4983
5251
|
{
|