github-linguist 6.0.1 → 6.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/grammars/annotation.liquidhaskell.haskell.json +13 -4
- data/grammars/hint.haskell.json +13 -4
- data/grammars/hint.message.haskell.json +13 -4
- data/grammars/hint.type.haskell.json +13 -4
- data/grammars/source.angelscript.json +1 -1
- data/grammars/source.ballerina.json +25 -2
- data/grammars/source.batchfile.json +69 -38
- data/grammars/source.c.json +1 -1
- data/grammars/source.clarion.json +4 -4
- data/grammars/source.cs.json +3952 -780
- data/grammars/source.elixir.json +7 -7
- data/grammars/source.fortran.json +38 -35
- data/grammars/source.fortran.modern.json +6 -6
- data/grammars/source.graphql.json +55 -2
- data/grammars/source.haskell.json +13 -4
- data/grammars/source.hsig.json +13 -4
- data/grammars/source.hx.json +2309 -0
- data/grammars/source.hxml.json +37 -5
- data/grammars/source.isabelle.theory.json +7 -7
- data/grammars/source.js.json +39 -54
- data/grammars/source.js.regexp.json +11 -5
- data/grammars/source.julia.json +16 -5
- data/grammars/{source.Kotlin.json → source.kotlin.json} +118 -33
- data/grammars/source.mathematica.json +0 -1
- data/grammars/source.meson.json +4 -0
- data/grammars/source.mupad.json +36 -12
- data/grammars/source.netlinx.erb.json +1 -2
- data/grammars/source.netlinx.json +0 -3
- data/grammars/source.nextflow.json +7 -7
- data/grammars/source.perl.json +1 -1
- data/grammars/source.renpy.json +436 -648
- data/grammars/source.scala.json +133 -87
- data/grammars/source.sed.json +1520 -0
- data/grammars/source.shell.json +17 -17
- data/grammars/source.solidity.json +1 -1
- data/grammars/source.swift.json +1 -1
- data/grammars/source.terraform.json +1 -1
- data/grammars/source.ts.json +493 -122
- data/grammars/source.tsx.json +568 -191
- data/grammars/source.x86.json +295 -0
- data/grammars/source.yaml.json +41 -21
- data/grammars/source.yara.json +1 -1
- data/grammars/text.haml.json +15 -0
- data/grammars/text.html.creole.json +1 -1
- data/grammars/text.html.php.blade.json +2 -2
- data/grammars/text.html.php.json +55 -134
- data/grammars/text.html.smarty.json +25 -1
- data/grammars/text.html.vue.json +0 -6
- data/grammars/text.restructuredtext.json +110 -17
- data/grammars/text.tex.latex.haskell.json +13 -4
- data/lib/linguist/documentation.yml +1 -0
- data/lib/linguist/generated.rb +9 -1
- data/lib/linguist/heuristics.rb +2 -0
- data/lib/linguist/language.rb +0 -8
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +103 -7
- data/lib/linguist/linguist.bundle +0 -0
- data/lib/linguist/samples.json +1221 -262
- data/lib/linguist/shebang.rb +7 -4
- data/lib/linguist/strategy/extension.rb +15 -2
- data/lib/linguist/strategy/filename.rb +15 -2
- data/lib/linguist/vendor.yml +7 -0
- data/lib/linguist/version.rb +1 -1
- metadata +17 -19
- data/grammars/source.erazor.json +0 -118
- data/grammars/source.haxe.2.json +0 -1267
- data/grammars/source.hss.1.json +0 -442
- data/grammars/source.nmml.json +0 -81
- data/grammars/source.sbt.json +0 -39
data/grammars/source.shell.json
CHANGED
@@ -109,7 +109,7 @@
|
|
109
109
|
]
|
110
110
|
},
|
111
111
|
"comment": {
|
112
|
-
"begin": "(^\\s+)?(?\u003c=^|\\W)(?=#)(?!#{)",
|
112
|
+
"begin": "(^\\s+)?(?\u003c=^|\\W)(?\u003c!-)(?=#)(?!#{)",
|
113
113
|
"end": "(?!\\G)",
|
114
114
|
"patterns": [
|
115
115
|
{
|
@@ -284,7 +284,7 @@
|
|
284
284
|
{
|
285
285
|
"name": "string.unquoted.heredoc.no-indent.ruby.shell",
|
286
286
|
"contentName": "source.ruby.embedded.shell",
|
287
|
-
"begin": "(\u003c\u003c)
|
287
|
+
"begin": "(\u003c\u003c)-\\s*(\"|'|)\\s*(RUBY)(?=\\s|;|\u0026|\u003c|\"|')\\2",
|
288
288
|
"end": "^\\t*(RUBY)(?=\\s|;|\u0026|$)",
|
289
289
|
"patterns": [
|
290
290
|
{
|
@@ -308,7 +308,7 @@
|
|
308
308
|
{
|
309
309
|
"name": "string.unquoted.heredoc.ruby.shell",
|
310
310
|
"contentName": "source.ruby.embedded.shell",
|
311
|
-
"begin": "(\u003c\u003c)(\"|'|)\\s*(RUBY)(?=\\s|;|\u0026|\u003c|\"|')\\2",
|
311
|
+
"begin": "(\u003c\u003c)\\s*(\"|'|)\\s*(RUBY)(?=\\s|;|\u0026|\u003c|\"|')\\2",
|
312
312
|
"end": "^(RUBY)(?=\\s|;|\u0026|$)",
|
313
313
|
"patterns": [
|
314
314
|
{
|
@@ -332,7 +332,7 @@
|
|
332
332
|
{
|
333
333
|
"name": "string.unquoted.heredoc.no-indent.python.shell",
|
334
334
|
"contentName": "source.python.embedded.shell",
|
335
|
-
"begin": "(\u003c\u003c)
|
335
|
+
"begin": "(\u003c\u003c)-\\s*(\"|'|)\\s*(PYTHON)(?=\\s|;|\u0026|\u003c|\"|')\\2",
|
336
336
|
"end": "^\\t*(PYTHON)(?=\\s|;|\u0026|$)",
|
337
337
|
"patterns": [
|
338
338
|
{
|
@@ -356,7 +356,7 @@
|
|
356
356
|
{
|
357
357
|
"name": "string.unquoted.heredoc.python.shell",
|
358
358
|
"contentName": "source.python.embedded.shell",
|
359
|
-
"begin": "(\u003c\u003c)(\"|'|)\\s*(PYTHON)(?=\\s|;|\u0026|\u003c|\"|')\\2",
|
359
|
+
"begin": "(\u003c\u003c)\\s*(\"|'|)\\s*(PYTHON)(?=\\s|;|\u0026|\u003c|\"|')\\2",
|
360
360
|
"end": "^(PYTHON)(?=\\s|;|\u0026|$)",
|
361
361
|
"patterns": [
|
362
362
|
{
|
@@ -380,7 +380,7 @@
|
|
380
380
|
{
|
381
381
|
"name": "string.unquoted.heredoc.no-indent.applescript.shell",
|
382
382
|
"contentName": "source.applescript.embedded.shell",
|
383
|
-
"begin": "(\u003c\u003c)
|
383
|
+
"begin": "(\u003c\u003c)-\\s*(\"|'|)\\s*(APPLESCRIPT)(?=\\s|;|\u0026|\u003c|\"|')\\2",
|
384
384
|
"end": "^\\t*(APPLESCRIPT)(?=\\s|;|\u0026|$)",
|
385
385
|
"patterns": [
|
386
386
|
{
|
@@ -404,7 +404,7 @@
|
|
404
404
|
{
|
405
405
|
"name": "string.unquoted.heredoc.applescript.shell",
|
406
406
|
"contentName": "source.applescript.embedded.shell",
|
407
|
-
"begin": "(\u003c\u003c)(\"|'|)\\s*(APPLESCRIPT)(?=\\s|;|\u0026|\u003c|\"|')\\2",
|
407
|
+
"begin": "(\u003c\u003c)\\s*(\"|'|)\\s*(APPLESCRIPT)(?=\\s|;|\u0026|\u003c|\"|')\\2",
|
408
408
|
"end": "^(APPLESCRIPT)(?=\\s|;|\u0026|$)",
|
409
409
|
"patterns": [
|
410
410
|
{
|
@@ -428,7 +428,7 @@
|
|
428
428
|
{
|
429
429
|
"name": "string.unquoted.heredoc.no-indent.html.shell",
|
430
430
|
"contentName": "text.html.embedded.shell",
|
431
|
-
"begin": "(\u003c\u003c)
|
431
|
+
"begin": "(\u003c\u003c)-\\s*(\"|'|)\\s*(HTML)(?=\\s|;|\u0026|\u003c|\"|')\\2",
|
432
432
|
"end": "^\\t*(HTML)(?=\\s|;|\u0026|$)",
|
433
433
|
"patterns": [
|
434
434
|
{
|
@@ -452,7 +452,7 @@
|
|
452
452
|
{
|
453
453
|
"name": "string.unquoted.heredoc.html.shell",
|
454
454
|
"contentName": "text.html.embedded.shell",
|
455
|
-
"begin": "(\u003c\u003c)(\"|'|)\\s*(HTML)(?=\\s|;|\u0026|\u003c|\"|')\\2",
|
455
|
+
"begin": "(\u003c\u003c)\\s*(\"|'|)\\s*(HTML)(?=\\s|;|\u0026|\u003c|\"|')\\2",
|
456
456
|
"end": "^(HTML)(?=\\s|;|\u0026|$)",
|
457
457
|
"patterns": [
|
458
458
|
{
|
@@ -476,7 +476,7 @@
|
|
476
476
|
{
|
477
477
|
"name": "string.unquoted.heredoc.no-indent.markdown.shell",
|
478
478
|
"contentName": "text.html.markdown.embedded.shell",
|
479
|
-
"begin": "(\u003c\u003c)
|
479
|
+
"begin": "(\u003c\u003c)-\\s*(\"|'|)\\s*(MARKDOWN)(?=\\s|;|\u0026|\u003c|\"|')\\2",
|
480
480
|
"end": "^\\t*(MARKDOWN)(?=\\s|;|\u0026|$)",
|
481
481
|
"patterns": [
|
482
482
|
{
|
@@ -500,7 +500,7 @@
|
|
500
500
|
{
|
501
501
|
"name": "string.unquoted.heredoc.markdown.shell",
|
502
502
|
"contentName": "text.html.markdown.embedded.shell",
|
503
|
-
"begin": "(\u003c\u003c)(\"|'|)\\s*(MARKDOWN)(?=\\s|;|\u0026|\u003c|\"|')\\2",
|
503
|
+
"begin": "(\u003c\u003c)\\s*(\"|'|)\\s*(MARKDOWN)(?=\\s|;|\u0026|\u003c|\"|')\\2",
|
504
504
|
"end": "^(MARKDOWN)(?=\\s|;|\u0026|$)",
|
505
505
|
"patterns": [
|
506
506
|
{
|
@@ -524,7 +524,7 @@
|
|
524
524
|
{
|
525
525
|
"name": "string.unquoted.heredoc.no-indent.textile.shell",
|
526
526
|
"contentName": "text.html.textile.embedded.shell",
|
527
|
-
"begin": "(\u003c\u003c)
|
527
|
+
"begin": "(\u003c\u003c)-\\s*(\"|'|)\\s*(TEXTILE)(?=\\s|;|\u0026|\u003c|\"|')\\2",
|
528
528
|
"end": "^\\t*(TEXTILE)(?=\\s|;|\u0026|$)",
|
529
529
|
"patterns": [
|
530
530
|
{}
|
@@ -546,7 +546,7 @@
|
|
546
546
|
{
|
547
547
|
"name": "string.unquoted.heredoc.textile.shell",
|
548
548
|
"contentName": "text.html.textile.embedded.shell",
|
549
|
-
"begin": "(\u003c\u003c)(\"|'|)\\s*(TEXTILE)(?=\\s|;|\u0026|\u003c|\"|')\\2",
|
549
|
+
"begin": "(\u003c\u003c)\\s*(\"|'|)\\s*(TEXTILE)(?=\\s|;|\u0026|\u003c|\"|')\\2",
|
550
550
|
"end": "^(TEXTILE)(?=\\s|;|\u0026|$)",
|
551
551
|
"patterns": [
|
552
552
|
{}
|
@@ -568,7 +568,7 @@
|
|
568
568
|
{
|
569
569
|
"name": "string.unquoted.heredoc.no-indent.shell.shell",
|
570
570
|
"contentName": "source.shell.embedded.shell",
|
571
|
-
"begin": "(\u003c\u003c)
|
571
|
+
"begin": "(\u003c\u003c)-\\s*(\"|'|)\\s*(SHELL)(?=\\s|;|\u0026|\u003c|\"|')\\2",
|
572
572
|
"end": "^\\t*(\\3)(?=\\s|;|\u0026|$)",
|
573
573
|
"patterns": [
|
574
574
|
{
|
@@ -592,7 +592,7 @@
|
|
592
592
|
{
|
593
593
|
"name": "string.unquoted.heredoc.shell.shell",
|
594
594
|
"contentName": "source.shell.embedded.shell",
|
595
|
-
"begin": "(\u003c\u003c)(\"|'|)\\s*(SHELL)(?=\\s|;|\u0026|\u003c|\"|')\\2",
|
595
|
+
"begin": "(\u003c\u003c)\\s*(\"|'|)\\s*(SHELL)(?=\\s|;|\u0026|\u003c|\"|')\\2",
|
596
596
|
"end": "^(\\3)(?=\\s|;|\u0026|$)",
|
597
597
|
"patterns": [
|
598
598
|
{
|
@@ -615,7 +615,7 @@
|
|
615
615
|
},
|
616
616
|
{
|
617
617
|
"name": "string.unquoted.heredoc.no-indent.shell",
|
618
|
-
"begin": "(\u003c\u003c)
|
618
|
+
"begin": "(\u003c\u003c)-\\s*(\"|'|)\\s*\\\\?([^;\u0026\u003c\\s]+)\\2",
|
619
619
|
"end": "^\\t*(\\3)(?=\\s|;|\u0026|$)",
|
620
620
|
"beginCaptures": {
|
621
621
|
"1": {
|
@@ -633,7 +633,7 @@
|
|
633
633
|
},
|
634
634
|
{
|
635
635
|
"name": "string.unquoted.heredoc.shell",
|
636
|
-
"begin": "(\u003c\u003c)(\"|'|)\\s*\\\\?([^;\u0026\u003c\\s]+)\\2",
|
636
|
+
"begin": "(\u003c\u003c)\\s*(\"|'|)\\s*\\\\?([^;\u0026\u003c\\s]+)\\2",
|
637
637
|
"end": "^(\\3)(?=\\s|;|\u0026|$)",
|
638
638
|
"beginCaptures": {
|
639
639
|
"1": {
|
@@ -66,7 +66,7 @@
|
|
66
66
|
},
|
67
67
|
{
|
68
68
|
"name": "keyword.control",
|
69
|
-
"match": "\\b(var|import|function|constant|view|pure|storage|memory|if|else|for|while|do|break|continue|returns?|private|public|internal|external|inherited|this|suicide|selfdestruct|new|is|throw|revert|assert|require|\\_)\\b"
|
69
|
+
"match": "\\b(var|import|function|constant|view|pure|storage|memory|if|else|for|while|do|break|continue|returns?|private|public|internal|external|inherited|this|suicide|selfdestruct|emit|new|is|throw|revert|assert|require|\\_)\\b"
|
70
70
|
},
|
71
71
|
{
|
72
72
|
"match": "\\b([A-Za-z_]\\w+)(\\s+(?:private|public|internal|external|inherited))?\\s+([A-Za-z_]\\w*)\\;",
|
data/grammars/source.swift.json
CHANGED
@@ -231,7 +231,7 @@
|
|
231
231
|
"patterns": [
|
232
232
|
{
|
233
233
|
"name": "support.variable.swift",
|
234
|
-
"match": "(?\u003c
|
234
|
+
"match": "(?\u003c=^Process\\.|\\WProcess\\.|^CommandLine\\.|\\WCommandLine\\.)(arguments|argc|unsafeArgv)"
|
235
235
|
},
|
236
236
|
{
|
237
237
|
"name": "support.variable.swift",
|
@@ -213,7 +213,7 @@
|
|
213
213
|
}
|
214
214
|
},
|
215
215
|
"string_interpolation_keywords": {
|
216
|
-
"match": "(terraform|var|self|count|module|path|data)(\\.[\\w\\*]+)+",
|
216
|
+
"match": "(terraform|var|self|count|module|path|data|local)(\\.[\\w\\*]+)+",
|
217
217
|
"captures": {
|
218
218
|
"0": {
|
219
219
|
"name": "entity.other.attribute-name.terraform"
|
data/grammars/source.ts.json
CHANGED
@@ -25,7 +25,7 @@
|
|
25
25
|
},
|
26
26
|
"after-operator-block-as-object-literal": {
|
27
27
|
"name": "meta.objectliteral.ts",
|
28
|
-
"begin": "(?\u003c=[
|
28
|
+
"begin": "(?\u003c!\\+\\+|--)(?\u003c=[:=(,\\[?+!]|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^yield|[^\\._$[:alnum:]]yield|^throw|[^\\._$[:alnum:]]throw|^in|[^\\._$[:alnum:]]in|^of|[^\\._$[:alnum:]]of|^typeof|[^\\._$[:alnum:]]typeof|\u0026\u0026|\\|\\||\\*)\\s*(\\{)",
|
29
29
|
"end": "\\}",
|
30
30
|
"patterns": [
|
31
31
|
{
|
@@ -107,7 +107,7 @@
|
|
107
107
|
},
|
108
108
|
{
|
109
109
|
"name": "meta.arrow.ts",
|
110
|
-
"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 [(]\\s*\n (\n ([)]\\s*:) |
|
110
|
+
"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:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n )\n)",
|
111
111
|
"end": "(?==\u003e|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
|
112
112
|
"patterns": [
|
113
113
|
{
|
@@ -153,6 +153,18 @@
|
|
153
153
|
"name": "meta.return.type.arrow.ts",
|
154
154
|
"begin": "(?\u003c=\\))\\s*(:)",
|
155
155
|
"end": "(?==\u003e|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
|
156
|
+
"patterns": [
|
157
|
+
{
|
158
|
+
"include": "#arrow-return-type-body"
|
159
|
+
}
|
160
|
+
],
|
161
|
+
"beginCaptures": {
|
162
|
+
"1": {
|
163
|
+
"name": "keyword.operator.type.annotation.ts"
|
164
|
+
}
|
165
|
+
}
|
166
|
+
},
|
167
|
+
"arrow-return-type-body": {
|
156
168
|
"patterns": [
|
157
169
|
{
|
158
170
|
"begin": "(?\u003c=[:])(?=\\s*\\{)",
|
@@ -169,12 +181,11 @@
|
|
169
181
|
{
|
170
182
|
"include": "#type"
|
171
183
|
}
|
172
|
-
]
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
}
|
184
|
+
]
|
185
|
+
},
|
186
|
+
"async-modifier": {
|
187
|
+
"name": "storage.modifier.async.ts",
|
188
|
+
"match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(async)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
|
178
189
|
},
|
179
190
|
"binding-element": {
|
180
191
|
"patterns": [
|
@@ -233,7 +244,7 @@
|
|
233
244
|
"patterns": [
|
234
245
|
{
|
235
246
|
"name": "cast.expr.ts",
|
236
|
-
"begin": "(?:(?\u003c=^return|[^\\._$[:alnum:]]return|^throw|[^\\._$[:alnum:]]throw|^yield|[^\\._$[:alnum:]]yield|^await|[^\\._$[:alnum:]]await|^default|[^\\._$[:alnum:]]default|[=(,:\u003e*?\\\u0026\\|\\^]|[^_$[:alnum:]](?:\\+\\+|\\-\\-)|[^\\+]\\+|[^\\-]\\-))\\s*(\u003c)(?!\u003c?\\=)",
|
247
|
+
"begin": "(?:(?\u003c!\\+\\+|--)(?\u003c=^return|[^\\._$[:alnum:]]return|^throw|[^\\._$[:alnum:]]throw|^yield|[^\\._$[:alnum:]]yield|^await|[^\\._$[:alnum:]]await|^default|[^\\._$[:alnum:]]default|[=(,:\u003e*?\\\u0026\\|\\^]|[^_$[:alnum:]](?:\\+\\+|\\-\\-)|[^\\+]\\+|[^\\-]\\-))\\s*(\u003c)(?!\u003c?\\=)",
|
237
248
|
"end": "(\\\u003e)\\s*",
|
238
249
|
"patterns": [
|
239
250
|
{
|
@@ -367,6 +378,9 @@
|
|
367
378
|
{
|
368
379
|
"include": "#property-accessor"
|
369
380
|
},
|
381
|
+
{
|
382
|
+
"include": "#async-modifier"
|
383
|
+
},
|
370
384
|
{
|
371
385
|
"include": "#after-operator-block-as-object-literal"
|
372
386
|
},
|
@@ -1194,7 +1208,7 @@
|
|
1194
1208
|
{
|
1195
1209
|
"name": "meta.export.default.ts",
|
1196
1210
|
"begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(export)(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))",
|
1197
|
-
"end": "(
|
1211
|
+
"end": "(?=$|;|\\babstract\\b|\\basync\\b|\\bclass\\b|\\bconst\\b|\\bdeclare\\b|\\benum\\b|\\bexport\\b|\\bfunction\\b|\\bimport\\b|\\binterface\\b|\\blet\\b|\\bmodule\\b|\\bnamespace\\b|\\breturn\\b|\\btype\\b|\\bvar\\b)",
|
1198
1212
|
"patterns": [
|
1199
1213
|
{
|
1200
1214
|
"include": "#expression"
|
@@ -1215,7 +1229,7 @@
|
|
1215
1229
|
{
|
1216
1230
|
"name": "meta.export.ts",
|
1217
1231
|
"begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(export)(?!\\s*:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
|
1218
|
-
"end": "(
|
1232
|
+
"end": "(?=$|;|\\babstract\\b|\\basync\\b|\\bclass\\b|\\bconst\\b|\\bdeclare\\b|\\benum\\b|\\bexport\\b|\\bfunction\\b|\\bimport\\b|\\binterface\\b|\\blet\\b|\\bmodule\\b|\\bnamespace\\b|\\breturn\\b|\\btype\\b|\\bvar\\b)",
|
1219
1233
|
"patterns": [
|
1220
1234
|
{
|
1221
1235
|
"include": "#import-export-declaration"
|
@@ -1242,12 +1256,47 @@
|
|
1242
1256
|
}
|
1243
1257
|
]
|
1244
1258
|
},
|
1259
|
+
"expression-inside-possibly-arrow-parens": {
|
1260
|
+
"patterns": [
|
1261
|
+
{
|
1262
|
+
"include": "#expressionWithoutIdentifiers"
|
1263
|
+
},
|
1264
|
+
{
|
1265
|
+
"include": "#function-parameters-body"
|
1266
|
+
},
|
1267
|
+
{
|
1268
|
+
"include": "#identifiers"
|
1269
|
+
},
|
1270
|
+
{
|
1271
|
+
"include": "#expressionPunctuations"
|
1272
|
+
}
|
1273
|
+
]
|
1274
|
+
},
|
1245
1275
|
"expression-operators": {
|
1246
1276
|
"patterns": [
|
1247
1277
|
{
|
1248
1278
|
"name": "keyword.control.flow.ts",
|
1249
1279
|
"match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(await)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
|
1250
1280
|
},
|
1281
|
+
{
|
1282
|
+
"begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?=\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*\\*)",
|
1283
|
+
"end": "\\*",
|
1284
|
+
"patterns": [
|
1285
|
+
{
|
1286
|
+
"include": "#comment"
|
1287
|
+
}
|
1288
|
+
],
|
1289
|
+
"beginCaptures": {
|
1290
|
+
"1": {
|
1291
|
+
"name": "keyword.control.flow.ts"
|
1292
|
+
}
|
1293
|
+
},
|
1294
|
+
"endCaptures": {
|
1295
|
+
"0": {
|
1296
|
+
"name": "keyword.generator.asterisk.ts"
|
1297
|
+
}
|
1298
|
+
}
|
1299
|
+
},
|
1251
1300
|
{
|
1252
1301
|
"match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s*(\\*))?",
|
1253
1302
|
"captures": {
|
@@ -1349,7 +1398,7 @@
|
|
1349
1398
|
"match": "%|\\*|/|-|\\+"
|
1350
1399
|
},
|
1351
1400
|
{
|
1352
|
-
"match": "(?\u003c=[_$[:alnum:])])\\s*(/)(?![/*])",
|
1401
|
+
"match": "(?\u003c=[_$[:alnum:])\\]])\\s*(/)(?![/*])",
|
1353
1402
|
"captures": {
|
1354
1403
|
"1": {
|
1355
1404
|
"name": "keyword.operator.arithmetic.ts"
|
@@ -1391,6 +1440,9 @@
|
|
1391
1440
|
{
|
1392
1441
|
"include": "#arrow-function"
|
1393
1442
|
},
|
1443
|
+
{
|
1444
|
+
"include": "#paren-expression-possibly-arrow"
|
1445
|
+
},
|
1394
1446
|
{
|
1395
1447
|
"include": "#cast"
|
1396
1448
|
},
|
@@ -1400,6 +1452,9 @@
|
|
1400
1452
|
{
|
1401
1453
|
"include": "#new-expr"
|
1402
1454
|
},
|
1455
|
+
{
|
1456
|
+
"include": "#instanceof-expr"
|
1457
|
+
},
|
1403
1458
|
{
|
1404
1459
|
"include": "#object-literal"
|
1405
1460
|
},
|
@@ -1445,8 +1500,15 @@
|
|
1445
1500
|
"include": "#comment"
|
1446
1501
|
},
|
1447
1502
|
{
|
1448
|
-
"
|
1449
|
-
"
|
1503
|
+
"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*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # 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*(=\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*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
|
1504
|
+
"captures": {
|
1505
|
+
"1": {
|
1506
|
+
"name": "meta.definition.property.ts entity.name.function.ts"
|
1507
|
+
},
|
1508
|
+
"2": {
|
1509
|
+
"name": "keyword.operator.optional.ts"
|
1510
|
+
}
|
1511
|
+
}
|
1450
1512
|
},
|
1451
1513
|
{
|
1452
1514
|
"name": "meta.definition.property.ts variable.object.property.ts",
|
@@ -1466,33 +1528,45 @@
|
|
1466
1528
|
}
|
1467
1529
|
},
|
1468
1530
|
"for-loop": {
|
1469
|
-
"begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))
|
1470
|
-
"end": "
|
1531
|
+
"begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))for(?=((\\s+|(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*))await)?\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)?(\\())",
|
1532
|
+
"end": "(?\u003c=\\))",
|
1471
1533
|
"patterns": [
|
1472
1534
|
{
|
1473
|
-
"include": "#
|
1535
|
+
"include": "#comment"
|
1474
1536
|
},
|
1475
1537
|
{
|
1476
|
-
"
|
1538
|
+
"name": "keyword.control.loop.ts",
|
1539
|
+
"match": "await"
|
1477
1540
|
},
|
1478
1541
|
{
|
1479
|
-
"
|
1542
|
+
"begin": "\\(",
|
1543
|
+
"end": "\\)",
|
1544
|
+
"patterns": [
|
1545
|
+
{
|
1546
|
+
"include": "#var-expr"
|
1547
|
+
},
|
1548
|
+
{
|
1549
|
+
"include": "#expression"
|
1550
|
+
},
|
1551
|
+
{
|
1552
|
+
"include": "#punctuation-semicolon"
|
1553
|
+
}
|
1554
|
+
],
|
1555
|
+
"beginCaptures": {
|
1556
|
+
"0": {
|
1557
|
+
"name": "meta.brace.round.ts"
|
1558
|
+
}
|
1559
|
+
},
|
1560
|
+
"endCaptures": {
|
1561
|
+
"0": {
|
1562
|
+
"name": "meta.brace.round.ts"
|
1563
|
+
}
|
1564
|
+
}
|
1480
1565
|
}
|
1481
1566
|
],
|
1482
1567
|
"beginCaptures": {
|
1483
|
-
"1": {
|
1484
|
-
"name": "keyword.control.loop.ts"
|
1485
|
-
},
|
1486
|
-
"2": {
|
1487
|
-
"name": "keyword.control.loop.ts"
|
1488
|
-
},
|
1489
|
-
"3": {
|
1490
|
-
"name": "meta.brace.round.ts"
|
1491
|
-
}
|
1492
|
-
},
|
1493
|
-
"endCaptures": {
|
1494
1568
|
"0": {
|
1495
|
-
"name": "
|
1569
|
+
"name": "keyword.control.loop.ts"
|
1496
1570
|
}
|
1497
1571
|
}
|
1498
1572
|
},
|
@@ -1512,17 +1586,21 @@
|
|
1512
1586
|
},
|
1513
1587
|
{
|
1514
1588
|
"include": "#decl-block"
|
1589
|
+
},
|
1590
|
+
{
|
1591
|
+
"name": "keyword.generator.asterisk.ts",
|
1592
|
+
"match": "\\*"
|
1515
1593
|
}
|
1516
1594
|
]
|
1517
1595
|
},
|
1518
1596
|
"function-call": {
|
1519
|
-
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?\\.\\s*)?(\u003c\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^\u003c\u003e\\(]|(\\([^\\(\\)]*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^\u003c\u003e\\(]|(\\([^\\(\\)]*\\))|(?\u003c==)\\\u003e)*(?!=)\\\u003e)*(?!=)\u003e\\s*)?\\()",
|
1520
|
-
"end": "(?\u003c=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?\\.\\s*)?(\u003c\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^\u003c\u003e\\(]|(\\([^\\(\\)]*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^\u003c\u003e\\(]|(\\([^\\(\\)]*\\))|(?\u003c==)\\\u003e)*(?!=)\\\u003e)*(?!=)\u003e\\s*)?\\()",
|
1597
|
+
"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)*(?!=)\\\u003e)*(?!=)\u003e\\s*)?\\()",
|
1598
|
+
"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)*(?!=)\\\u003e)*(?!=)\u003e\\s*)?\\()",
|
1521
1599
|
"patterns": [
|
1522
1600
|
{
|
1523
1601
|
"name": "meta.function-call.ts",
|
1524
1602
|
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))",
|
1525
|
-
"end": "(?=\\s*(\\?\\.\\s*)?(\u003c\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^\u003c\u003e\\(]|(\\([^\\(\\)]*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^\u003c\u003e\\(]|(\\([^\\(\\)]*\\))|(?\u003c==)\\\u003e)*(?!=)\\\u003e)*(?!=)\u003e\\s*)?\\()",
|
1603
|
+
"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)*(?!=)\\\u003e)*(?!=)\u003e\\s*)?\\()",
|
1526
1604
|
"patterns": [
|
1527
1605
|
{
|
1528
1606
|
"include": "#literal"
|
@@ -1554,27 +1632,7 @@
|
|
1554
1632
|
"match": "\\?\\."
|
1555
1633
|
},
|
1556
1634
|
{
|
1557
|
-
"
|
1558
|
-
"begin": "\\\u003c",
|
1559
|
-
"end": "\\\u003e",
|
1560
|
-
"patterns": [
|
1561
|
-
{
|
1562
|
-
"include": "#type"
|
1563
|
-
},
|
1564
|
-
{
|
1565
|
-
"include": "#punctuation-comma"
|
1566
|
-
}
|
1567
|
-
],
|
1568
|
-
"beginCaptures": {
|
1569
|
-
"0": {
|
1570
|
-
"name": "punctuation.definition.typeparameters.begin.ts"
|
1571
|
-
}
|
1572
|
-
},
|
1573
|
-
"endCaptures": {
|
1574
|
-
"0": {
|
1575
|
-
"name": "punctuation.definition.typeparameters.end.ts"
|
1576
|
-
}
|
1577
|
-
}
|
1635
|
+
"include": "#type-arguments"
|
1578
1636
|
},
|
1579
1637
|
{
|
1580
1638
|
"include": "#paren-expression"
|
@@ -1586,6 +1644,9 @@
|
|
1586
1644
|
"begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(export)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?\u003c=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
|
1587
1645
|
"end": "(?=$|^|;)|(?\u003c=\\})",
|
1588
1646
|
"patterns": [
|
1647
|
+
{
|
1648
|
+
"include": "#function-name"
|
1649
|
+
},
|
1589
1650
|
{
|
1590
1651
|
"include": "#function-body"
|
1591
1652
|
}
|
@@ -1613,6 +1674,9 @@
|
|
1613
1674
|
"begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?\u003c=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
|
1614
1675
|
"end": "(?\u003c=\\})",
|
1615
1676
|
"patterns": [
|
1677
|
+
{
|
1678
|
+
"include": "#function-name"
|
1679
|
+
},
|
1616
1680
|
{
|
1617
1681
|
"include": "#function-body"
|
1618
1682
|
}
|
@@ -1632,10 +1696,31 @@
|
|
1632
1696
|
}
|
1633
1697
|
}
|
1634
1698
|
},
|
1699
|
+
"function-name": {
|
1700
|
+
"name": "meta.definition.function.ts entity.name.function.ts",
|
1701
|
+
"match": "[_$[:alpha:]][_$[:alnum:]]*"
|
1702
|
+
},
|
1635
1703
|
"function-parameters": {
|
1636
1704
|
"name": "meta.parameters.ts",
|
1637
1705
|
"begin": "\\(",
|
1638
1706
|
"end": "\\)",
|
1707
|
+
"patterns": [
|
1708
|
+
{
|
1709
|
+
"include": "#function-parameters-body"
|
1710
|
+
}
|
1711
|
+
],
|
1712
|
+
"beginCaptures": {
|
1713
|
+
"0": {
|
1714
|
+
"name": "punctuation.definition.parameters.begin.ts"
|
1715
|
+
}
|
1716
|
+
},
|
1717
|
+
"endCaptures": {
|
1718
|
+
"0": {
|
1719
|
+
"name": "punctuation.definition.parameters.end.ts"
|
1720
|
+
}
|
1721
|
+
}
|
1722
|
+
},
|
1723
|
+
"function-parameters-body": {
|
1639
1724
|
"patterns": [
|
1640
1725
|
{
|
1641
1726
|
"include": "#comment"
|
@@ -1659,17 +1744,7 @@
|
|
1659
1744
|
"name": "punctuation.separator.parameter.ts",
|
1660
1745
|
"match": ","
|
1661
1746
|
}
|
1662
|
-
]
|
1663
|
-
"beginCaptures": {
|
1664
|
-
"0": {
|
1665
|
-
"name": "punctuation.definition.parameters.begin.ts"
|
1666
|
-
}
|
1667
|
-
},
|
1668
|
-
"endCaptures": {
|
1669
|
-
"0": {
|
1670
|
-
"name": "punctuation.definition.parameters.end.ts"
|
1671
|
-
}
|
1672
|
-
}
|
1747
|
+
]
|
1673
1748
|
},
|
1674
1749
|
"identifiers": {
|
1675
1750
|
"patterns": [
|
@@ -1677,7 +1752,7 @@
|
|
1677
1752
|
"include": "#object-identifiers"
|
1678
1753
|
},
|
1679
1754
|
{
|
1680
|
-
"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 # sure shot arrow functions even if =\u003e is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) |
|
1755
|
+
"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*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n))",
|
1681
1756
|
"captures": {
|
1682
1757
|
"1": {
|
1683
1758
|
"name": "punctuation.accessor.ts"
|
@@ -1733,6 +1808,26 @@
|
|
1733
1808
|
"begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(\\bexport)\\s+)?\\b(import)(?!\\s*[:\\(])(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
|
1734
1809
|
"end": "(?=;|$|^)",
|
1735
1810
|
"patterns": [
|
1811
|
+
{
|
1812
|
+
"include": "#comment"
|
1813
|
+
},
|
1814
|
+
{
|
1815
|
+
"include": "#string"
|
1816
|
+
},
|
1817
|
+
{
|
1818
|
+
"begin": "(?\u003c=^import|[^\\._$[:alnum:]]import)(?!\\s*[\"'])",
|
1819
|
+
"end": "\\bfrom\\b",
|
1820
|
+
"patterns": [
|
1821
|
+
{
|
1822
|
+
"include": "#import-export-declaration"
|
1823
|
+
}
|
1824
|
+
],
|
1825
|
+
"endCaptures": {
|
1826
|
+
"0": {
|
1827
|
+
"name": "keyword.control.from.ts"
|
1828
|
+
}
|
1829
|
+
}
|
1830
|
+
},
|
1736
1831
|
{
|
1737
1832
|
"include": "#import-export-declaration"
|
1738
1833
|
}
|
@@ -1856,7 +1951,7 @@
|
|
1856
1951
|
"include": "#comment"
|
1857
1952
|
},
|
1858
1953
|
{
|
1859
|
-
"match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*))\\s+(as)\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*)",
|
1954
|
+
"match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*))\\s+(as)\\s+(?:(\\bdefault(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(\\b[_$[:alpha:]][_$[:alnum:]]*))",
|
1860
1955
|
"captures": {
|
1861
1956
|
"1": {
|
1862
1957
|
"name": "keyword.control.default.ts"
|
@@ -1871,6 +1966,9 @@
|
|
1871
1966
|
"name": "keyword.control.as.ts"
|
1872
1967
|
},
|
1873
1968
|
"5": {
|
1969
|
+
"name": "keyword.control.default.ts"
|
1970
|
+
},
|
1971
|
+
"6": {
|
1874
1972
|
"name": "variable.other.readwrite.alias.ts"
|
1875
1973
|
}
|
1876
1974
|
}
|
@@ -1943,8 +2041,8 @@
|
|
1943
2041
|
},
|
1944
2042
|
"indexer-mapped-type-declaration": {
|
1945
2043
|
"name": "meta.indexer.mappedtype.declaration.ts",
|
1946
|
-
"begin": "(?:(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(readonly)\\s*)?(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s+(in)\\s+",
|
1947
|
-
"end": "(\\])
|
2044
|
+
"begin": "(?:(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))([+-])?(readonly)\\s*)?(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s+(in)\\s+",
|
2045
|
+
"end": "(\\])([+-])?\\s*(\\?\\s*)?|$",
|
1948
2046
|
"patterns": [
|
1949
2047
|
{
|
1950
2048
|
"include": "#type"
|
@@ -1952,15 +2050,18 @@
|
|
1952
2050
|
],
|
1953
2051
|
"beginCaptures": {
|
1954
2052
|
"1": {
|
1955
|
-
"name": "
|
2053
|
+
"name": "keyword.operator.type.modifier.ts"
|
1956
2054
|
},
|
1957
2055
|
"2": {
|
1958
|
-
"name": "
|
2056
|
+
"name": "storage.modifier.ts"
|
1959
2057
|
},
|
1960
2058
|
"3": {
|
1961
|
-
"name": "
|
2059
|
+
"name": "meta.brace.square.ts"
|
1962
2060
|
},
|
1963
2061
|
"4": {
|
2062
|
+
"name": "entity.name.type.ts"
|
2063
|
+
},
|
2064
|
+
"5": {
|
1964
2065
|
"name": "keyword.operator.expression.in.ts"
|
1965
2066
|
}
|
1966
2067
|
},
|
@@ -1969,6 +2070,9 @@
|
|
1969
2070
|
"name": "meta.brace.square.ts"
|
1970
2071
|
},
|
1971
2072
|
"2": {
|
2073
|
+
"name": "keyword.operator.type.modifier.ts"
|
2074
|
+
},
|
2075
|
+
"3": {
|
1972
2076
|
"name": "keyword.operator.optional.ts"
|
1973
2077
|
}
|
1974
2078
|
}
|
@@ -2034,6 +2138,20 @@
|
|
2034
2138
|
}
|
2035
2139
|
]
|
2036
2140
|
},
|
2141
|
+
"instanceof-expr": {
|
2142
|
+
"begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(instanceof)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
|
2143
|
+
"end": "(?\u003c=\\))|(?=[;),}\\]:?]|\\|\\||\\\u0026\\\u0026|$|((?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
|
2144
|
+
"patterns": [
|
2145
|
+
{
|
2146
|
+
"include": "#type"
|
2147
|
+
}
|
2148
|
+
],
|
2149
|
+
"beginCaptures": {
|
2150
|
+
"1": {
|
2151
|
+
"name": "keyword.operator.expression.instanceof.ts"
|
2152
|
+
}
|
2153
|
+
}
|
2154
|
+
},
|
2037
2155
|
"interface-declaration": {
|
2038
2156
|
"name": "meta.interface.ts",
|
2039
2157
|
"begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(interface)\\b(?=\\s+|/[/*])",
|
@@ -2224,7 +2342,7 @@
|
|
2224
2342
|
"namespace-declaration": {
|
2225
2343
|
"name": "meta.namespace.declaration.ts",
|
2226
2344
|
"begin": "(?:(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(\\bexport)\\s+)?\\b(namespace|module)\\s+(?=[_$[:alpha:]\"'`]))",
|
2227
|
-
"end": "(?\u003c=\\})|(?=;|\\babstract\\b|\\basync\\b|\\bclass\\b|\\bconst\\b|\\bdeclare\\b|\\benum\\b|\\bexport\\b|\\bfunction\\b|\\bimport\\b|\\binterface\\b|\\blet\\b|\\bmodule\\b|\\bnamespace\\b|\\btype\\b|\\bvar\\b)",
|
2345
|
+
"end": "(?\u003c=\\})|(?=;|\\babstract\\b|\\basync\\b|\\bclass\\b|\\bconst\\b|\\bdeclare\\b|\\benum\\b|\\bexport\\b|\\bfunction\\b|\\bimport\\b|\\binterface\\b|\\blet\\b|\\bmodule\\b|\\bnamespace\\b|\\breturn\\b|\\btype\\b|\\bvar\\b)",
|
2228
2346
|
"patterns": [
|
2229
2347
|
{
|
2230
2348
|
"include": "#comment"
|
@@ -2255,7 +2373,7 @@
|
|
2255
2373
|
"new-expr": {
|
2256
2374
|
"name": "new.expr.ts",
|
2257
2375
|
"begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(new)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
|
2258
|
-
"end": "(?\u003c=\\))|(?=[;),}\\]]|$|((?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
|
2376
|
+
"end": "(?\u003c=\\))|(?=[;),}\\]:]|\\|\\||\\\u0026\\\u0026|$|((?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
|
2259
2377
|
"patterns": [
|
2260
2378
|
{
|
2261
2379
|
"include": "#paren-expression"
|
@@ -2281,18 +2399,18 @@
|
|
2281
2399
|
"patterns": [
|
2282
2400
|
{
|
2283
2401
|
"name": "constant.numeric.hex.ts",
|
2284
|
-
"match": "\\b(?\u003c!\\$)0(x|X)[0-9a-fA-F]
|
2402
|
+
"match": "\\b(?\u003c!\\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\$)"
|
2285
2403
|
},
|
2286
2404
|
{
|
2287
2405
|
"name": "constant.numeric.binary.ts",
|
2288
|
-
"match": "\\b(?\u003c!\\$)0(b|B)[01]
|
2406
|
+
"match": "\\b(?\u003c!\\$)0(b|B)[01][01_]*\\b(?!\\$)"
|
2289
2407
|
},
|
2290
2408
|
{
|
2291
2409
|
"name": "constant.numeric.octal.ts",
|
2292
|
-
"match": "\\b(?\u003c!\\$)0(o|O)?[0-7]
|
2410
|
+
"match": "\\b(?\u003c!\\$)0(o|O)?[0-7][0-7_]*\\b(?!\\$)"
|
2293
2411
|
},
|
2294
2412
|
{
|
2295
|
-
"match": "(?x)\n(?\u003c!\\$)(?:\n (?:\\b[0-9]
|
2413
|
+
"match": "(?x)\n(?\u003c!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*\\b)| # .1\n (?:\\b[0-9][0-9_]*\\b(?!\\.)) # 1\n)(?!\\$)",
|
2296
2414
|
"captures": {
|
2297
2415
|
"0": {
|
2298
2416
|
"name": "constant.numeric.decimal.ts"
|
@@ -2516,7 +2634,7 @@
|
|
2516
2634
|
{
|
2517
2635
|
"name": "meta.object.member.ts meta.object-literal.key.ts",
|
2518
2636
|
"begin": "(?=\\[)",
|
2519
|
-
"end": "(?=:)",
|
2637
|
+
"end": "(?=:)|((?\u003c=[\\]])(?=\\s*[\\(\\\u003c]))",
|
2520
2638
|
"patterns": [
|
2521
2639
|
{
|
2522
2640
|
"include": "#array-literal"
|
@@ -2526,13 +2644,23 @@
|
|
2526
2644
|
{
|
2527
2645
|
"name": "meta.object.member.ts meta.object-literal.key.ts",
|
2528
2646
|
"begin": "(?=[\\'\\\"])",
|
2529
|
-
"end": "(?=:)",
|
2647
|
+
"end": "(?=:)|((?\u003c=[\\'\\\"])(?=\\s*[\\(\\\u003c]))",
|
2530
2648
|
"patterns": [
|
2531
2649
|
{
|
2532
2650
|
"include": "#string"
|
2533
2651
|
}
|
2534
2652
|
]
|
2535
2653
|
},
|
2654
|
+
{
|
2655
|
+
"name": "meta.method.declaration.ts",
|
2656
|
+
"begin": "(?\u003c=[\\]\\'\\\"])(?=\\s*[\\(\\\u003c])",
|
2657
|
+
"end": "(?=\\}|;|,)|(?\u003c=\\})",
|
2658
|
+
"patterns": [
|
2659
|
+
{
|
2660
|
+
"include": "#function-body"
|
2661
|
+
}
|
2662
|
+
]
|
2663
|
+
},
|
2536
2664
|
{
|
2537
2665
|
"name": "meta.object.member.ts",
|
2538
2666
|
"match": "(?![_$[:alpha:]])([[:digit:]]+)\\s*(?=:)",
|
@@ -2547,7 +2675,7 @@
|
|
2547
2675
|
},
|
2548
2676
|
{
|
2549
2677
|
"name": "meta.object.member.ts",
|
2550
|
-
"match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if =\u003e is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) |
|
2678
|
+
"match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
|
2551
2679
|
"captures": {
|
2552
2680
|
"0": {
|
2553
2681
|
"name": "meta.object-literal.key.ts"
|
@@ -2605,6 +2733,61 @@
|
|
2605
2733
|
"begin": ":",
|
2606
2734
|
"end": "(?=,|\\})",
|
2607
2735
|
"patterns": [
|
2736
|
+
{
|
2737
|
+
"begin": "(?\u003c=:)\\s*(async)?(?=\\s*(\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)\\(\\s*$)",
|
2738
|
+
"end": "(?\u003c=\\))",
|
2739
|
+
"patterns": [
|
2740
|
+
{
|
2741
|
+
"include": "#type-parameters"
|
2742
|
+
},
|
2743
|
+
{
|
2744
|
+
"begin": "\\(",
|
2745
|
+
"end": "\\)",
|
2746
|
+
"patterns": [
|
2747
|
+
{
|
2748
|
+
"include": "#expression-inside-possibly-arrow-parens"
|
2749
|
+
}
|
2750
|
+
],
|
2751
|
+
"beginCaptures": {
|
2752
|
+
"0": {
|
2753
|
+
"name": "meta.brace.round.ts"
|
2754
|
+
}
|
2755
|
+
},
|
2756
|
+
"endCaptures": {
|
2757
|
+
"0": {
|
2758
|
+
"name": "meta.brace.round.ts"
|
2759
|
+
}
|
2760
|
+
}
|
2761
|
+
}
|
2762
|
+
],
|
2763
|
+
"beginCaptures": {
|
2764
|
+
"1": {
|
2765
|
+
"name": "storage.modifier.async.ts"
|
2766
|
+
}
|
2767
|
+
}
|
2768
|
+
},
|
2769
|
+
{
|
2770
|
+
"begin": "(?\u003c=:)\\s*(async)?\\s*(\\()(?=\\s*$)",
|
2771
|
+
"end": "\\)",
|
2772
|
+
"patterns": [
|
2773
|
+
{
|
2774
|
+
"include": "#expression-inside-possibly-arrow-parens"
|
2775
|
+
}
|
2776
|
+
],
|
2777
|
+
"beginCaptures": {
|
2778
|
+
"1": {
|
2779
|
+
"name": "storage.modifier.async.ts"
|
2780
|
+
},
|
2781
|
+
"2": {
|
2782
|
+
"name": "meta.brace.round.ts"
|
2783
|
+
}
|
2784
|
+
},
|
2785
|
+
"endCaptures": {
|
2786
|
+
"0": {
|
2787
|
+
"name": "meta.brace.round.ts"
|
2788
|
+
}
|
2789
|
+
}
|
2790
|
+
},
|
2608
2791
|
{
|
2609
2792
|
"include": "#expression"
|
2610
2793
|
}
|
@@ -2675,7 +2858,7 @@
|
|
2675
2858
|
}
|
2676
2859
|
},
|
2677
2860
|
{
|
2678
|
-
"match": "(?x)(?:\\s*\\b(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 # sure shot arrow functions even if =\u003e is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) |
|
2861
|
+
"match": "(?x)(?:\\s*\\b(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*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # 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*(=\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*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
|
2679
2862
|
"captures": {
|
2680
2863
|
"1": {
|
2681
2864
|
"name": "storage.modifier.ts"
|
@@ -2775,9 +2958,6 @@
|
|
2775
2958
|
"patterns": [
|
2776
2959
|
{
|
2777
2960
|
"include": "#expression"
|
2778
|
-
},
|
2779
|
-
{
|
2780
|
-
"include": "#punctuation-comma"
|
2781
2961
|
}
|
2782
2962
|
],
|
2783
2963
|
"beginCaptures": {
|
@@ -2791,6 +2971,83 @@
|
|
2791
2971
|
}
|
2792
2972
|
}
|
2793
2973
|
},
|
2974
|
+
"paren-expression-possibly-arrow": {
|
2975
|
+
"patterns": [
|
2976
|
+
{
|
2977
|
+
"begin": "(?\u003c=[(=,]|=\u003e)\\s*(async)?(?=\\s*(\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)\\(\\s*$)",
|
2978
|
+
"end": "(?\u003c=\\))",
|
2979
|
+
"patterns": [
|
2980
|
+
{
|
2981
|
+
"include": "#type-parameters"
|
2982
|
+
},
|
2983
|
+
{
|
2984
|
+
"begin": "\\(",
|
2985
|
+
"end": "\\)",
|
2986
|
+
"patterns": [
|
2987
|
+
{
|
2988
|
+
"include": "#expression-inside-possibly-arrow-parens"
|
2989
|
+
}
|
2990
|
+
],
|
2991
|
+
"beginCaptures": {
|
2992
|
+
"0": {
|
2993
|
+
"name": "meta.brace.round.ts"
|
2994
|
+
}
|
2995
|
+
},
|
2996
|
+
"endCaptures": {
|
2997
|
+
"0": {
|
2998
|
+
"name": "meta.brace.round.ts"
|
2999
|
+
}
|
3000
|
+
}
|
3001
|
+
}
|
3002
|
+
],
|
3003
|
+
"beginCaptures": {
|
3004
|
+
"1": {
|
3005
|
+
"name": "storage.modifier.async.ts"
|
3006
|
+
}
|
3007
|
+
}
|
3008
|
+
},
|
3009
|
+
{
|
3010
|
+
"begin": "(?\u003c=[(=,]|=\u003e)\\s*(async)?\\s*(\\()(?=\\s*$)",
|
3011
|
+
"end": "\\)",
|
3012
|
+
"patterns": [
|
3013
|
+
{
|
3014
|
+
"include": "#expression-inside-possibly-arrow-parens"
|
3015
|
+
}
|
3016
|
+
],
|
3017
|
+
"beginCaptures": {
|
3018
|
+
"1": {
|
3019
|
+
"name": "storage.modifier.async.ts"
|
3020
|
+
},
|
3021
|
+
"2": {
|
3022
|
+
"name": "meta.brace.round.ts"
|
3023
|
+
}
|
3024
|
+
},
|
3025
|
+
"endCaptures": {
|
3026
|
+
"0": {
|
3027
|
+
"name": "meta.brace.round.ts"
|
3028
|
+
}
|
3029
|
+
}
|
3030
|
+
},
|
3031
|
+
{
|
3032
|
+
"include": "#possibly-arrow-return-type"
|
3033
|
+
}
|
3034
|
+
]
|
3035
|
+
},
|
3036
|
+
"possibly-arrow-return-type": {
|
3037
|
+
"contentName": "meta.arrow.ts meta.return.type.arrow.ts",
|
3038
|
+
"begin": "(?\u003c=\\))\\s*(:)(?=\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+\\s*=\u003e)",
|
3039
|
+
"end": "(?==\u003e|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
|
3040
|
+
"patterns": [
|
3041
|
+
{
|
3042
|
+
"include": "#arrow-return-type-body"
|
3043
|
+
}
|
3044
|
+
],
|
3045
|
+
"beginCaptures": {
|
3046
|
+
"1": {
|
3047
|
+
"name": "meta.arrow.ts meta.return.type.arrow.ts keyword.operator.type.annotation.ts"
|
3048
|
+
}
|
3049
|
+
}
|
3050
|
+
},
|
2794
3051
|
"property-accessor": {
|
2795
3052
|
"name": "storage.type.property.ts",
|
2796
3053
|
"match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(get|set)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
|
@@ -2864,8 +3121,8 @@
|
|
2864
3121
|
"patterns": [
|
2865
3122
|
{
|
2866
3123
|
"name": "string.regexp.ts",
|
2867
|
-
"begin": "(?\u003c=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=\u003e|\u0026\u0026|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/(?![\\/*])[
|
2868
|
-
"end": "(/)([
|
3124
|
+
"begin": "(?\u003c!\\+\\+|--)(?\u003c=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=\u003e|\u0026\u0026|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/(?![\\/*])[gimsuy]*(?!\\s*[a-zA-Z0-9_$]))",
|
3125
|
+
"end": "(/)([gimsuy]*)",
|
2869
3126
|
"patterns": [
|
2870
3127
|
{
|
2871
3128
|
"include": "#regexp"
|
@@ -2887,8 +3144,8 @@
|
|
2887
3144
|
},
|
2888
3145
|
{
|
2889
3146
|
"name": "string.regexp.ts",
|
2890
|
-
"begin": "(?\u003c![_$[:alnum:])])\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/(?![\\/*])[
|
2891
|
-
"end": "(/)([
|
3147
|
+
"begin": "(?\u003c![_$[:alnum:])\\]]|\\+\\+|--)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/(?![\\/*])[gimsuy]*(?!\\s*[a-zA-Z0-9_$]))",
|
3148
|
+
"end": "(/)([gimsuy]*)",
|
2892
3149
|
"patterns": [
|
2893
3150
|
{
|
2894
3151
|
"include": "#regexp"
|
@@ -2937,8 +3194,15 @@
|
|
2937
3194
|
"match": "\\\\[bB]|\\^|\\$"
|
2938
3195
|
},
|
2939
3196
|
{
|
2940
|
-
"
|
2941
|
-
"
|
3197
|
+
"match": "\\\\[1-9]\\d*|\\\\k\u003c([a-zA-Z_$][\\w$]*)\u003e",
|
3198
|
+
"captures": {
|
3199
|
+
"0": {
|
3200
|
+
"name": "keyword.other.back-reference.regexp"
|
3201
|
+
},
|
3202
|
+
"1": {
|
3203
|
+
"name": "variable.other.regexp"
|
3204
|
+
}
|
3205
|
+
}
|
2942
3206
|
},
|
2943
3207
|
{
|
2944
3208
|
"name": "keyword.operator.quantifier.regexp",
|
@@ -2950,7 +3214,7 @@
|
|
2950
3214
|
},
|
2951
3215
|
{
|
2952
3216
|
"name": "meta.group.assertion.regexp",
|
2953
|
-
"begin": "(\\()((\\?=)|(\\?!))",
|
3217
|
+
"begin": "(\\()((\\?=)|(\\?!)|(\\?\u003c=)|(\\?\u003c!))",
|
2954
3218
|
"end": "(\\))",
|
2955
3219
|
"patterns": [
|
2956
3220
|
{
|
@@ -2969,6 +3233,12 @@
|
|
2969
3233
|
},
|
2970
3234
|
"4": {
|
2971
3235
|
"name": "meta.assertion.negative-look-ahead.regexp"
|
3236
|
+
},
|
3237
|
+
"5": {
|
3238
|
+
"name": "meta.assertion.look-behind.regexp"
|
3239
|
+
},
|
3240
|
+
"6": {
|
3241
|
+
"name": "meta.assertion.negative-look-behind.regexp"
|
2972
3242
|
}
|
2973
3243
|
},
|
2974
3244
|
"endCaptures": {
|
@@ -2979,7 +3249,7 @@
|
|
2979
3249
|
},
|
2980
3250
|
{
|
2981
3251
|
"name": "meta.group.regexp",
|
2982
|
-
"begin": "\\((\\?:)?",
|
3252
|
+
"begin": "\\((?:(\\?:)|(?:\\?\u003c([a-zA-Z_$][\\w$]*)\u003e))?",
|
2983
3253
|
"end": "\\)",
|
2984
3254
|
"patterns": [
|
2985
3255
|
{
|
@@ -2992,6 +3262,9 @@
|
|
2992
3262
|
},
|
2993
3263
|
"1": {
|
2994
3264
|
"name": "punctuation.definition.group.no-capture.regexp"
|
3265
|
+
},
|
3266
|
+
"2": {
|
3267
|
+
"name": "variable.other.regexp"
|
2995
3268
|
}
|
2996
3269
|
},
|
2997
3270
|
"endCaptures": {
|
@@ -3165,12 +3438,16 @@
|
|
3165
3438
|
},
|
3166
3439
|
{
|
3167
3440
|
"name": "support.class.builtin.ts",
|
3168
|
-
"match": "(?x)(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(Array|ArrayBuffer|Atomics|Boolean|DataView|Date|Float32Array|Float64Array|Function|Generator\n |GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|
|
3441
|
+
"match": "(?x)(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(Array|ArrayBuffer|Atomics|Boolean|DataView|Date|Float32Array|Float64Array|Function|Generator\n |GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Proxy\n |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray\n |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\\b(?!\\$)"
|
3169
3442
|
},
|
3170
3443
|
{
|
3171
3444
|
"name": "support.class.error.ts",
|
3172
3445
|
"match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))((Eval|Internal|Range|Reference|Syntax|Type|URI)?Error)\\b(?!\\$)"
|
3173
3446
|
},
|
3447
|
+
{
|
3448
|
+
"name": "support.class.promise.ts",
|
3449
|
+
"match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(Promise)\\b(?!\\$)"
|
3450
|
+
},
|
3174
3451
|
{
|
3175
3452
|
"name": "support.function.ts",
|
3176
3453
|
"match": "(?x)(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(clear(Interval|Timeout)|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|\n isFinite|isNaN|parseFloat|parseInt|require|set(Interval|Timeout)|super|unescape|uneval)(?=\\s*\\()"
|
@@ -3258,7 +3535,7 @@
|
|
3258
3535
|
}
|
3259
3536
|
},
|
3260
3537
|
{
|
3261
|
-
"match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s* (?:\n (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE\n |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR\n |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR\n |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR)\n |\n (_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName\n |appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop\n |availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor\n |borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption\n |cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear\n |clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete\n |components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset\n |defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight\n |dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds\n |enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize\n |fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host\n |hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth\n |input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext\n |lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom\n |marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeTypes|multiline|multiple\n |name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName\n |notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight\n |outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer\n |parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling\n |product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText\n |responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts\n |scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove\n |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary\n |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead\n |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile\n |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\\b(?!\\$|\\s*(\u003c\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\\()",
|
3538
|
+
"match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s* (?:\n (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE\n |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR\n |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR\n |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR)\n |\n (_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName\n |appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop\n |availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor\n |borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption\n |cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear\n |clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete\n |components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset\n |defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight\n |dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds\n |enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize\n |fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host\n |hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth\n |input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext\n |lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom\n |marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeTypes|multiline|multiple\n |name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName\n |notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight\n |outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer\n |parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling\n |product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText\n |responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts\n |scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove\n |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary\n |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead\n |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile\n |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\\b(?!\\$|\\s*(\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\\()",
|
3262
3539
|
"captures": {
|
3263
3540
|
"1": {
|
3264
3541
|
"name": "punctuation.accessor.ts"
|
@@ -3323,7 +3600,7 @@
|
|
3323
3600
|
"match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(global|GLOBAL|root|__dirname|__filename)\\b(?!\\$)"
|
3324
3601
|
},
|
3325
3602
|
{
|
3326
|
-
"match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s*\n(?:\n (on(?:Rowsinserted|Rowsdelete|Rowenter|Rowexit|Resize|Resizestart|Resizeend|Reset|\n Readystatechange|Mouseout|Mouseover|Mousedown|Mouseup|Mousemove|\n Before(?:cut|deactivate|unload|update|paste|print|editfocus|activate)|\n Blur|Scrolltop|Submit|Select|Selectstart|Selectionchange|Hover|Help|\n Change|Contextmenu|Controlselect|Cut|Cellchange|Clock|Close|Deactivate|\n Datasetchanged|Datasetcomplete|Dataavailable|Drop|Drag|Dragstart|Dragover|\n Dragdrop|Dragenter|Dragend|Dragleave|Dblclick|Unload|Paste|Propertychange|Error|\n Errorupdate|Keydown|Keyup|Keypress|Focus|Load|Activate|Afterupdate|Afterprint|Abort)\n ) |\n (shift|showModelessDialog|showModalDialog|showHelp|scroll|scrollX|scrollByPages|\n scrollByLines|scrollY|scrollTo|stop|strike|sizeToContent|sidebar|signText|sort|\n sup|sub|substr|substring|splice|split|send|set(?:Milliseconds|Seconds|Minutes|Hours|\n Month|Year|FullYear|Date|UTC(?:Milliseconds|Seconds|Minutes|Hours|Month|FullYear|Date)|\n Time|Hotkeys|Cursor|ZOptions|Active|Resizable|RequestHeader)|search|slice|\n savePreferences|small|home|handleEvent|navigate|char|charCodeAt|charAt|concat|\n contextual|confirm|compile|clear|captureEvents|call|createStyleSheet|createPopup|\n createEventObject|to(?:GMTString|UTCString|String|Source|UpperCase|LowerCase|LocaleString)|\n test|taint|taintEnabled|indexOf|italics|disableExternalCapture|dump|detachEvent|unshift|\n untaint|unwatch|updateCommands|join|javaEnabled|pop|push|plugins.refresh|paddings|parse|\n print|prompt|preference|enableExternalCapture|exec|execScript|valueOf|UTC|find|file|\n fileModifiedDate|fileSize|fileCreatedDate|fileUpdatedDate|fixed|fontsize|fontcolor|\n forward|fromCharCode|watch|link|load|lastIndexOf|anchor|attachEvent|atob|apply|alert|\n abort|routeEvents|resize|resizeBy|resizeTo|recalc|returnValue|replace|reverse|reload|\n releaseCapture|releaseEvents|go|get(?:Milliseconds|Seconds|Minutes|Hours|Month|Day|Year|FullYear|\n Time|Date|TimezoneOffset|UTC(?:Milliseconds|Seconds|Minutes|Hours|Day|Month|FullYear|Date)|\n Attention|Selection|ResponseHeader|AllResponseHeaders)|moveBy|moveBelow|moveTo|\n moveToAbsolute|moveAbove|mergeAttributes|match|margins|btoa|big|bold|borderWidths|blink|back\n ) |\n (acceptNode|add|addEventListener|addTextTrack|adoptNode|after|animate|append|\n appendChild|appendData|before|blur|canPlayType|captureStream|\n caretPositionFromPoint|caretRangeFromPoint|checkValidity|clear|click|\n cloneContents|cloneNode|cloneRange|close|closest|collapse|\n compareBoundaryPoints|compareDocumentPosition|comparePoint|contains|\n convertPointFromNode|convertQuadFromNode|convertRectFromNode|createAttribute|\n createAttributeNS|createCaption|createCDATASection|createComment|\n createContextualFragment|createDocument|createDocumentFragment|\n createDocumentType|createElement|createElementNS|createEntityReference|\n createEvent|createExpression|createHTMLDocument|createNodeIterator|\n createNSResolver|createProcessingInstruction|createRange|createShadowRoot|\n createTBody|createTextNode|createTFoot|createTHead|createTreeWalker|delete|\n deleteCaption|deleteCell|deleteContents|deleteData|deleteRow|deleteTFoot|\n deleteTHead|detach|disconnect|dispatchEvent|elementFromPoint|elementsFromPoint|\n enableStyleSheetsForSet|entries|evaluate|execCommand|exitFullscreen|\n exitPointerLock|expand|extractContents|fastSeek|firstChild|focus|forEach|get|\n getAll|getAnimations|getAttribute|getAttributeNames|getAttributeNode|\n getAttributeNodeNS|getAttributeNS|getBoundingClientRect|getBoxQuads|\n getClientRects|getContext|getDestinationInsertionPoints|getElementById|\n getElementsByClassName|getElementsByName|getElementsByTagName|\n getElementsByTagNameNS|getItem|getNamedItem|getSelection|getStartDate|\n getVideoPlaybackQuality|has|hasAttribute|hasAttributeNS|hasAttributes|\n hasChildNodes|hasFeature|hasFocus|importNode|initEvent|insertAdjacentElement|\n insertAdjacentHTML|insertAdjacentText|insertBefore|insertCell|insertData|\n insertNode|insertRow|intersectsNode|isDefaultNamespace|isEqualNode|\n isPointInRange|isSameNode|item|key|keys|lastChild|load|lookupNamespaceURI|\n lookupPrefix|matches|move|moveAttribute|moveAttributeNode|moveChild|\n moveNamedItem|namedItem|nextNode|nextSibling|normalize|observe|open|\n parentNode|pause|play|postMessage|prepend|preventDefault|previousNode|\n previousSibling|probablySupportsContext|queryCommandEnabled|\n queryCommandIndeterm|queryCommandState|queryCommandSupported|queryCommandValue|\n querySelector|querySelectorAll|registerContentHandler|registerElement|\n registerProtocolHandler|releaseCapture|releaseEvents|remove|removeAttribute|\n removeAttributeNode|removeAttributeNS|removeChild|removeEventListener|\n removeItem|replace|replaceChild|replaceData|replaceWith|reportValidity|\n requestFullscreen|requestPointerLock|reset|scroll|scrollBy|scrollIntoView|\n scrollTo|seekToNextFrame|select|selectNode|selectNodeContents|set|setAttribute|\n setAttributeNode|setAttributeNodeNS|setAttributeNS|setCapture|\n setCustomValidity|setEnd|setEndAfter|setEndBefore|setItem|setNamedItem|\n setRangeText|setSelectionRange|setSinkId|setStart|setStartAfter|setStartBefore|\n slice|splitText|stepDown|stepUp|stopImmediatePropagation|stopPropagation|\n submit|substringData|supports|surroundContents|takeRecords|terminate|toBlob|\n toDataURL|toggle|toString|values|write|writeln\n )\n)(?=\\s*\\()",
|
3603
|
+
"match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s*\n(?:\n (on(?:Rowsinserted|Rowsdelete|Rowenter|Rowexit|Resize|Resizestart|Resizeend|Reset|\n Readystatechange|Mouseout|Mouseover|Mousedown|Mouseup|Mousemove|\n Before(?:cut|deactivate|unload|update|paste|print|editfocus|activate)|\n Blur|Scrolltop|Submit|Select|Selectstart|Selectionchange|Hover|Help|\n Change|Contextmenu|Controlselect|Cut|Cellchange|Clock|Close|Deactivate|\n Datasetchanged|Datasetcomplete|Dataavailable|Drop|Drag|Dragstart|Dragover|\n Dragdrop|Dragenter|Dragend|Dragleave|Dblclick|Unload|Paste|Propertychange|Error|\n Errorupdate|Keydown|Keyup|Keypress|Focus|Load|Activate|Afterupdate|Afterprint|Abort)\n ) |\n (shift|showModelessDialog|showModalDialog|showHelp|scroll|scrollX|scrollByPages|\n scrollByLines|scrollY|scrollTo|stop|strike|sizeToContent|sidebar|signText|sort|\n sup|sub|substr|substring|splice|split|send|set(?:Milliseconds|Seconds|Minutes|Hours|\n Month|Year|FullYear|Date|UTC(?:Milliseconds|Seconds|Minutes|Hours|Month|FullYear|Date)|\n Time|Hotkeys|Cursor|ZOptions|Active|Resizable|RequestHeader)|search|slice|\n savePreferences|small|home|handleEvent|navigate|char|charCodeAt|charAt|concat|\n contextual|confirm|compile|clear|captureEvents|call|createStyleSheet|createPopup|\n createEventObject|to(?:GMTString|UTCString|String|Source|UpperCase|LowerCase|LocaleString)|\n test|taint|taintEnabled|indexOf|italics|disableExternalCapture|dump|detachEvent|unshift|\n untaint|unwatch|updateCommands|join|javaEnabled|pop|push|plugins.refresh|paddings|parse|\n print|prompt|preference|enableExternalCapture|exec|execScript|valueOf|UTC|find|file|\n fileModifiedDate|fileSize|fileCreatedDate|fileUpdatedDate|fixed|fontsize|fontcolor|\n forward|fromCharCode|watch|link|load|lastIndexOf|anchor|attachEvent|atob|apply|alert|\n abort|routeEvents|resize|resizeBy|resizeTo|recalc|returnValue|replace|reverse|reload|\n releaseCapture|releaseEvents|go|get(?:Milliseconds|Seconds|Minutes|Hours|Month|Day|Year|FullYear|\n Time|Date|TimezoneOffset|UTC(?:Milliseconds|Seconds|Minutes|Hours|Day|Month|FullYear|Date)|\n Attention|Selection|ResponseHeader|AllResponseHeaders)|moveBy|moveBelow|moveTo|\n moveToAbsolute|moveAbove|mergeAttributes|match|margins|btoa|big|bold|borderWidths|blink|back\n ) |\n (acceptNode|add|addEventListener|addTextTrack|adoptNode|after|animate|append|\n appendChild|appendData|before|blur|canPlayType|captureStream|\n caretPositionFromPoint|caretRangeFromPoint|checkValidity|clear|click|\n cloneContents|cloneNode|cloneRange|close|closest|collapse|\n compareBoundaryPoints|compareDocumentPosition|comparePoint|contains|\n convertPointFromNode|convertQuadFromNode|convertRectFromNode|createAttribute|\n createAttributeNS|createCaption|createCDATASection|createComment|\n createContextualFragment|createDocument|createDocumentFragment|\n createDocumentType|createElement|createElementNS|createEntityReference|\n createEvent|createExpression|createHTMLDocument|createNodeIterator|\n createNSResolver|createProcessingInstruction|createRange|createShadowRoot|\n createTBody|createTextNode|createTFoot|createTHead|createTreeWalker|delete|\n deleteCaption|deleteCell|deleteContents|deleteData|deleteRow|deleteTFoot|\n deleteTHead|detach|disconnect|dispatchEvent|elementFromPoint|elementsFromPoint|\n enableStyleSheetsForSet|entries|evaluate|execCommand|exitFullscreen|\n exitPointerLock|expand|extractContents|fastSeek|firstChild|focus|forEach|get|\n getAll|getAnimations|getAttribute|getAttributeNames|getAttributeNode|\n getAttributeNodeNS|getAttributeNS|getBoundingClientRect|getBoxQuads|\n getClientRects|getContext|getDestinationInsertionPoints|getElementById|\n getElementsByClassName|getElementsByName|getElementsByTagName|\n getElementsByTagNameNS|getItem|getNamedItem|getSelection|getStartDate|\n getVideoPlaybackQuality|has|hasAttribute|hasAttributeNS|hasAttributes|\n hasChildNodes|hasFeature|hasFocus|importNode|initEvent|insertAdjacentElement|\n insertAdjacentHTML|insertAdjacentText|insertBefore|insertCell|insertData|\n insertNode|insertRow|intersectsNode|isDefaultNamespace|isEqualNode|\n isPointInRange|isSameNode|item|key|keys|lastChild|load|lookupNamespaceURI|\n lookupPrefix|matches|move|moveAttribute|moveAttributeNode|moveChild|\n moveNamedItem|namedItem|nextNode|nextSibling|normalize|observe|open|\n parentNode|pause|play|postMessage|prepend|preventDefault|previousNode|\n previousSibling|probablySupportsContext|queryCommandEnabled|\n queryCommandIndeterm|queryCommandState|queryCommandSupported|queryCommandValue|\n querySelector|querySelectorAll|registerContentHandler|registerElement|\n registerProtocolHandler|releaseCapture|releaseEvents|remove|removeAttribute|\n removeAttributeNode|removeAttributeNS|removeChild|removeEventListener|\n removeItem|replace|replaceChild|replaceData|replaceWith|reportValidity|\n requestFullscreen|requestPointerLock|reset|scroll|scrollBy|scrollIntoView|\n scrollTo|seekToNextFrame|select|selectNode|selectNodeContents|set|setAttribute|\n setAttributeNode|setAttributeNodeNS|setAttributeNS|setCapture|\n setCustomValidity|setEnd|setEndAfter|setEndBefore|setItem|setNamedItem|\n setRangeText|setSelectionRange|setSinkId|setStart|setStartAfter|setStartBefore|\n slice|splitText|stepDown|stepUp|stopImmediatePropagation|stopPropagation|\n submit|substringData|supports|surroundContents|takeRecords|terminate|toBlob|\n toDataURL|toggle|toString|values|write|writeln\n ) |\n (all|catch|finally|race|reject|resolve|then\n )\n)(?=\\s*\\()",
|
3327
3604
|
"captures": {
|
3328
3605
|
"1": {
|
3329
3606
|
"name": "punctuation.accessor.ts"
|
@@ -3339,6 +3616,9 @@
|
|
3339
3616
|
},
|
3340
3617
|
"5": {
|
3341
3618
|
"name": "support.function.dom.ts"
|
3619
|
+
},
|
3620
|
+
"6": {
|
3621
|
+
"name": "support.function.promise.ts"
|
3342
3622
|
}
|
3343
3623
|
}
|
3344
3624
|
}
|
@@ -3380,7 +3660,7 @@
|
|
3380
3660
|
{
|
3381
3661
|
"name": "case-clause.expr.ts",
|
3382
3662
|
"begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(case|default(?=:))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
|
3383
|
-
"end": "
|
3663
|
+
"end": "(?=:)",
|
3384
3664
|
"patterns": [
|
3385
3665
|
{
|
3386
3666
|
"include": "#expression"
|
@@ -3390,10 +3670,36 @@
|
|
3390
3670
|
"1": {
|
3391
3671
|
"name": "keyword.control.switch.ts"
|
3392
3672
|
}
|
3673
|
+
}
|
3674
|
+
},
|
3675
|
+
{
|
3676
|
+
"contentName": "meta.block.ts",
|
3677
|
+
"begin": "(:)\\s*(\\{)",
|
3678
|
+
"end": "\\}",
|
3679
|
+
"patterns": [
|
3680
|
+
{
|
3681
|
+
"include": "#statements"
|
3682
|
+
}
|
3683
|
+
],
|
3684
|
+
"beginCaptures": {
|
3685
|
+
"1": {
|
3686
|
+
"name": "case-clause.expr.ts punctuation.definition.section.case-statement.ts"
|
3687
|
+
},
|
3688
|
+
"2": {
|
3689
|
+
"name": "meta.block.ts punctuation.definition.block.ts"
|
3690
|
+
}
|
3393
3691
|
},
|
3394
3692
|
"endCaptures": {
|
3395
3693
|
"0": {
|
3396
|
-
"name": "punctuation.definition.
|
3694
|
+
"name": "meta.block.ts punctuation.definition.block.ts"
|
3695
|
+
}
|
3696
|
+
}
|
3697
|
+
},
|
3698
|
+
{
|
3699
|
+
"match": "(:)",
|
3700
|
+
"captures": {
|
3701
|
+
"0": {
|
3702
|
+
"name": "case-clause.expr.ts punctuation.definition.section.case-statement.ts"
|
3397
3703
|
}
|
3398
3704
|
}
|
3399
3705
|
},
|
@@ -3415,30 +3721,49 @@
|
|
3415
3721
|
}
|
3416
3722
|
},
|
3417
3723
|
"template": {
|
3418
|
-
"name": "string.template.ts",
|
3419
|
-
"begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
|
3420
|
-
"end": "`",
|
3421
3724
|
"patterns": [
|
3422
3725
|
{
|
3423
|
-
"
|
3726
|
+
"name": "string.template.ts",
|
3727
|
+
"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)*(?!=)\\\u003e)*(?!=)\u003e\\s*)`)",
|
3728
|
+
"end": "(?=`)",
|
3729
|
+
"patterns": [
|
3730
|
+
{
|
3731
|
+
"include": "#type-parameters"
|
3732
|
+
}
|
3733
|
+
],
|
3734
|
+
"beginCaptures": {
|
3735
|
+
"1": {
|
3736
|
+
"name": "entity.name.function.tagged-template.ts"
|
3737
|
+
}
|
3738
|
+
}
|
3424
3739
|
},
|
3425
3740
|
{
|
3426
|
-
"
|
3427
|
-
|
3428
|
-
|
3429
|
-
|
3430
|
-
|
3431
|
-
|
3432
|
-
|
3433
|
-
|
3434
|
-
|
3435
|
-
|
3436
|
-
|
3437
|
-
|
3438
|
-
|
3439
|
-
|
3741
|
+
"name": "string.template.ts",
|
3742
|
+
"begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
|
3743
|
+
"end": "`",
|
3744
|
+
"patterns": [
|
3745
|
+
{
|
3746
|
+
"include": "#template-substitution-element"
|
3747
|
+
},
|
3748
|
+
{
|
3749
|
+
"include": "#string-character-escape"
|
3750
|
+
}
|
3751
|
+
],
|
3752
|
+
"beginCaptures": {
|
3753
|
+
"1": {
|
3754
|
+
"name": "entity.name.function.tagged-template.ts"
|
3755
|
+
},
|
3756
|
+
"2": {
|
3757
|
+
"name": "punctuation.definition.string.template.begin.ts"
|
3758
|
+
}
|
3759
|
+
},
|
3760
|
+
"endCaptures": {
|
3761
|
+
"0": {
|
3762
|
+
"name": "punctuation.definition.string.template.end.ts"
|
3763
|
+
}
|
3764
|
+
}
|
3440
3765
|
}
|
3441
|
-
|
3766
|
+
]
|
3442
3767
|
},
|
3443
3768
|
"template-substitution-element": {
|
3444
3769
|
"name": "meta.template.expression.ts",
|
@@ -3463,7 +3788,7 @@
|
|
3463
3788
|
},
|
3464
3789
|
"ternary-expression": {
|
3465
3790
|
"begin": "(?!\\?\\.\\s*[^[:digit:]])(\\?)",
|
3466
|
-
"end": "(:)",
|
3791
|
+
"end": "\\s*(:)",
|
3467
3792
|
"patterns": [
|
3468
3793
|
{
|
3469
3794
|
"include": "#expression"
|
@@ -3475,7 +3800,7 @@
|
|
3475
3800
|
}
|
3476
3801
|
},
|
3477
3802
|
"endCaptures": {
|
3478
|
-
"
|
3803
|
+
"1": {
|
3479
3804
|
"name": "keyword.operator.ternary.ts"
|
3480
3805
|
}
|
3481
3806
|
}
|
@@ -3510,6 +3835,9 @@
|
|
3510
3835
|
{
|
3511
3836
|
"include": "#type-object"
|
3512
3837
|
},
|
3838
|
+
{
|
3839
|
+
"include": "#type-conditional"
|
3840
|
+
},
|
3513
3841
|
{
|
3514
3842
|
"include": "#type-operators"
|
3515
3843
|
},
|
@@ -3530,7 +3858,7 @@
|
|
3530
3858
|
"type-alias-declaration": {
|
3531
3859
|
"name": "meta.type.declaration.ts",
|
3532
3860
|
"begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(\\bexport)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*",
|
3533
|
-
"end": "(
|
3861
|
+
"end": "(?=\\}|;|\\babstract\\b|\\basync\\b|\\bclass\\b|\\bconst\\b|\\bdeclare\\b|\\benum\\b|\\bexport\\b|\\bfunction\\b|\\bimport\\b|\\binterface\\b|\\blet\\b|\\bmodule\\b|\\bnamespace\\b|\\breturn\\b|\\btype\\b|\\bvar\\b)",
|
3534
3862
|
"patterns": [
|
3535
3863
|
{
|
3536
3864
|
"include": "#comment"
|
@@ -3596,10 +3924,41 @@
|
|
3596
3924
|
}
|
3597
3925
|
]
|
3598
3926
|
},
|
3927
|
+
"type-arguments": {
|
3928
|
+
"name": "meta.type.parameters.ts",
|
3929
|
+
"begin": "\\\u003c",
|
3930
|
+
"end": "\\\u003e",
|
3931
|
+
"patterns": [
|
3932
|
+
{
|
3933
|
+
"include": "#type"
|
3934
|
+
},
|
3935
|
+
{
|
3936
|
+
"include": "#punctuation-comma"
|
3937
|
+
}
|
3938
|
+
],
|
3939
|
+
"beginCaptures": {
|
3940
|
+
"0": {
|
3941
|
+
"name": "punctuation.definition.typeparameters.begin.ts"
|
3942
|
+
}
|
3943
|
+
},
|
3944
|
+
"endCaptures": {
|
3945
|
+
"0": {
|
3946
|
+
"name": "punctuation.definition.typeparameters.end.ts"
|
3947
|
+
}
|
3948
|
+
}
|
3949
|
+
},
|
3599
3950
|
"type-builtin-literals": {
|
3600
3951
|
"name": "support.type.builtin.ts",
|
3601
3952
|
"match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
|
3602
3953
|
},
|
3954
|
+
"type-conditional": {
|
3955
|
+
"match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(extends)\\s+",
|
3956
|
+
"captures": {
|
3957
|
+
"1": {
|
3958
|
+
"name": "storage.modifier.ts"
|
3959
|
+
}
|
3960
|
+
}
|
3961
|
+
},
|
3603
3962
|
"type-fn-type-parameters": {
|
3604
3963
|
"patterns": [
|
3605
3964
|
{
|
@@ -3805,6 +4164,18 @@
|
|
3805
4164
|
{
|
3806
4165
|
"name": "keyword.operator.expression.keyof.ts",
|
3807
4166
|
"match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))keyof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
|
4167
|
+
},
|
4168
|
+
{
|
4169
|
+
"name": "keyword.operator.ternary.ts",
|
4170
|
+
"match": "(\\?|\\:)"
|
4171
|
+
},
|
4172
|
+
{
|
4173
|
+
"name": "keyword.operator.expression.infer.ts",
|
4174
|
+
"match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))infer(?=\\s+[_$[:alpha:]])"
|
4175
|
+
},
|
4176
|
+
{
|
4177
|
+
"name": "keyword.operator.expression.import.ts",
|
4178
|
+
"match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))import(?=\\s*\\()"
|
3808
4179
|
}
|
3809
4180
|
]
|
3810
4181
|
},
|
@@ -3961,7 +4332,7 @@
|
|
3961
4332
|
"patterns": [
|
3962
4333
|
{
|
3963
4334
|
"name": "meta.var-single-variable.expr.ts",
|
3964
|
-
"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 # sure shot arrow functions even if =\u003e is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) |
|
4335
|
+
"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*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # 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*(=\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*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\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:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
|
3965
4336
|
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
|
3966
4337
|
"patterns": [
|
3967
4338
|
{
|