github-linguist 4.8.8 → 4.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/grammars/hint.haskell.json +1123 -0
- data/grammars/hint.message.haskell.json +1147 -0
- data/grammars/hint.type.haskell.json +1120 -0
- data/grammars/source.asn.json +59 -0
- data/grammars/source.blitzmax.json +0 -2
- data/grammars/source.bsl.json +372 -0
- data/grammars/source.c++.json +67 -0
- data/grammars/source.c2hs.json +27 -0
- data/grammars/source.cabal.json +66 -0
- data/grammars/source.coffee.json +6 -5
- data/grammars/source.crystal.json +0 -11
- data/grammars/source.csound-score.json +3 -3
- data/grammars/source.csound.json +51 -15
- data/grammars/source.css.json +1 -1
- data/grammars/source.css.less.json +9 -5
- data/grammars/source.cython.json +42 -193
- data/grammars/source.d.json +7 -7
- data/grammars/source.elixir.json +2 -2
- data/grammars/source.forth.json +0 -2
- data/grammars/source.graphql.json +8 -2
- data/grammars/source.haskell.json +1089 -323
- data/grammars/source.hsc2hs.json +12 -0
- data/grammars/source.ideal.json +356 -0
- data/grammars/source.java.json +3 -0
- data/grammars/source.js.json +262 -131
- data/grammars/source.js.jsx.json +848 -256
- data/grammars/source.lsl.json +51 -103
- data/grammars/source.objc.json +1 -1
- data/grammars/source.parrot.pir.json +49 -15
- data/grammars/source.pic.json +868 -0
- data/grammars/source.purescript.json +114 -90
- data/grammars/source.python.json +11 -9
- data/grammars/source.regexp.babel.json +1 -1
- data/grammars/source.renpy.json +7 -7
- data/grammars/source.rexx.json +59 -0
- data/grammars/source.sas.json +8 -75
- data/grammars/source.sdbl.json +97 -0
- data/grammars/source.shell.json +1 -0
- data/grammars/source.smali.json +2 -2
- data/grammars/source.sqf.json +11 -11
- data/grammars/source.stan.json +60 -25
- data/grammars/source.tla.json +18 -6
- data/grammars/source.toc.json +5 -1
- data/grammars/source.ts.json +134 -31
- data/grammars/source.tsx.json +134 -31
- data/grammars/source.vhdl.json +150 -117
- data/grammars/source.viml.json +4 -4
- data/grammars/source.xquery.json +23 -5
- data/grammars/source.yaml.json +35 -19
- data/grammars/text.html.handlebars.json +2 -2
- data/grammars/text.html.php.blade.json +1 -1
- data/grammars/text.html.twig.json +1 -4
- data/grammars/text.html.vue.json +41 -1
- data/grammars/text.restructuredtext.json +56 -1
- data/grammars/text.roff.json +5089 -0
- data/grammars/text.runoff.json +321 -0
- data/grammars/text.slim.json +126 -105
- data/grammars/text.tex.latex.haskell.json +1335 -21
- data/lib/linguist/heuristics.rb +8 -0
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +58 -3
- data/lib/linguist/samples.json +5257 -76
- data/lib/linguist/version.rb +1 -1
- metadata +16 -4
- data/grammars/source.man.json +0 -53
- data/grammars/text.groff.json +0 -113
data/grammars/source.js.jsx.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "Babel ES6 JavaScript",
|
|
3
3
|
"scopeName": "source.js.jsx",
|
|
4
|
-
"foldingStartMarker": "(
|
|
4
|
+
"foldingStartMarker": "(/\\*|{|\\()",
|
|
5
5
|
"foldingEndMarker": "(\\*/|\\}|\\))",
|
|
6
6
|
"firstLineMatch": "^#!\\s*/.*\\b(node|js)$\\n?",
|
|
7
7
|
"fileTypes": [
|
|
@@ -105,7 +105,8 @@
|
|
|
105
105
|
"include": "#literal-language-variable"
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
|
-
"include": "#literal-object"
|
|
108
|
+
"include": "#literal-object",
|
|
109
|
+
"comment": "before literal-module as it traps default {"
|
|
109
110
|
},
|
|
110
111
|
{
|
|
111
112
|
"include": "#literal-module"
|
|
@@ -146,7 +147,7 @@
|
|
|
146
147
|
"comment": "so set at arbitary 1000 chars to avoid parsing minified files",
|
|
147
148
|
"patterns": [
|
|
148
149
|
{
|
|
149
|
-
"match": "
|
|
150
|
+
"match": "^.{1000,}"
|
|
150
151
|
}
|
|
151
152
|
]
|
|
152
153
|
},
|
|
@@ -156,7 +157,7 @@
|
|
|
156
157
|
"comment": "e.g. play: function(arg1, arg2) { }",
|
|
157
158
|
"name": "meta.function.json.js",
|
|
158
159
|
"begin": "(?<=^|{|,)\\s*+([_$a-zA-Z][$\\w]*)\\s*+(:)\\s*+(?:(async)\\s+)?\\s*+((?<!\\.)\\bfunction\\b)\\s*+(?:(\\*)\\s*)?\\s*(?=\\(|<)",
|
|
159
|
-
"end": "(
|
|
160
|
+
"end": "(?={)",
|
|
160
161
|
"applyEndPatternLast": 1,
|
|
161
162
|
"beginCaptures": {
|
|
162
163
|
"1": {
|
|
@@ -184,8 +185,8 @@
|
|
|
184
185
|
{
|
|
185
186
|
"comment": "e.g. 'play': function(arg1, arg2) { }",
|
|
186
187
|
"name": "meta.function.json.js",
|
|
187
|
-
"begin": "(?<=^|{|,)\\s*+(('
|
|
188
|
-
"end": "(
|
|
188
|
+
"begin": "(?<=^|{|,)\\s*+(('|\")([^\"']*)(\\k<-3>))\\s*+(:)\\s*+(async)?\\s*+((?<!\\.)\\bfunction\\b)\\s*(\\*\\s*)?\\s*(?=\\(|<)",
|
|
189
|
+
"end": "(?={)",
|
|
189
190
|
"applyEndPatternLast": 1,
|
|
190
191
|
"beginCaptures": {
|
|
191
192
|
"1": {
|
|
@@ -226,7 +227,7 @@
|
|
|
226
227
|
{
|
|
227
228
|
"comment": "e.g. play: async <T>(args) => { }",
|
|
228
229
|
"name": "meta.function.json.arrow.js",
|
|
229
|
-
"begin": "(?<=^|{|,)\\s*+(\\b[_$a-zA-Z][$\\w]*)\\s*+(:)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\g<-1>)*\\))\\s*+(
|
|
230
|
+
"begin": "(?<=^|{|,)\\s*+(\\b[_$a-zA-Z][$\\w]*)\\s*+(:)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\g<-1>)*\\))\\s*+(((?::(?:(\\s*+(&|\\|)?(\\s*+[$_a-zA-Z0-9]+(<(?:(?>[^<>]+)|\\g<-1>)*>)?|\\s*+({(?:(?>[^{}]+)|\\g<-1>)*\\})|\\s*+(\\[(?:(?>[^\\[\\]]+)|\\g<-1>)*\\])|\\s*+(\\s*([\"']).*?\\k<-1>(?<!\\\\.))|\\s*[x0-9A-Fa-f]+))|(?:\\s*+/\\*.*?\\*/))*+)*)|(?:/\\*.*?\\*/))(((?<=checks)|(\\s*\\bchecks))\\b\\s*(\\((?:(?>[^()]+)|\\g<-1>)*\\))?)?\\s*=>)",
|
|
230
231
|
"end": "\\s*(=>)",
|
|
231
232
|
"beginCaptures": {
|
|
232
233
|
"1": {
|
|
@@ -253,7 +254,7 @@
|
|
|
253
254
|
{
|
|
254
255
|
"comment": "e.g. play: arg => { }",
|
|
255
256
|
"name": "meta.function.json.arrow.js",
|
|
256
|
-
"begin": "(?<=^|{|,)\\s*+(\\b[_$a-zA-Z][$\\w]*)\\s*+(:)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+([_$a-zA-Z][$\\w]*)\\s*+(
|
|
257
|
+
"begin": "(?<=^|{|,)\\s*+(\\b[_$a-zA-Z][$\\w]*)\\s*+(:)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+([_$a-zA-Z][$\\w]*)\\s*+(((?::(?:(\\s*+(&|\\|)?(\\s*+[$_a-zA-Z0-9]+(<(?:(?>[^<>]+)|\\g<-1>)*>)?|\\s*+({(?:(?>[^{}]+)|\\g<-1>)*\\})|\\s*+(\\[(?:(?>[^\\[\\]]+)|\\g<-1>)*\\])|\\s*+(\\s*([\"']).*?\\k<-1>(?<!\\\\.))|\\s*[x0-9A-Fa-f]+))|(?:\\s*+/\\*.*?\\*/))*+)*)|(?:/\\*.*?\\*/))\\s*=>)",
|
|
257
258
|
"end": "\\s*(=>)",
|
|
258
259
|
"beginCaptures": {
|
|
259
260
|
"1": {
|
|
@@ -283,7 +284,7 @@
|
|
|
283
284
|
{
|
|
284
285
|
"comment": "e.g. 'play': (args) => { }",
|
|
285
286
|
"name": "meta.function.json.arrow.js",
|
|
286
|
-
"begin": "(?<=^|{|,)\\s*+(('
|
|
287
|
+
"begin": "(?<=^|{|,)\\s*+(('|\")([^\"']*)(\\k<-3>))\\s*(:)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\g<-1>)*\\))\\s*+(((?::(?:(\\s*+(&|\\|)?(\\s*+[$_a-zA-Z0-9]+(<(?:(?>[^<>]+)|\\g<-1>)*>)?|\\s*+({(?:(?>[^{}]+)|\\g<-1>)*\\})|\\s*+(\\[(?:(?>[^\\[\\]]+)|\\g<-1>)*\\])|\\s*+(\\s*([\"']).*?\\k<-1>(?<!\\\\.))|\\s*[x0-9A-Fa-f]+))|(?:\\s*+/\\*.*?\\*/))*+)*)|(?:/\\*.*?\\*/))(((?<=checks)|(\\s*\\bchecks))\\b\\s*(\\((?:(?>[^()]+)|\\g<-1>)*\\))?)?\\s*=>)",
|
|
287
288
|
"end": "\\s*(=>)",
|
|
288
289
|
"applyEndPatternLast": 1,
|
|
289
290
|
"endCaptures": {
|
|
@@ -320,7 +321,7 @@
|
|
|
320
321
|
{
|
|
321
322
|
"comment": "e.g. 'play': arg => { }",
|
|
322
323
|
"name": "meta.function.json.arrow.js",
|
|
323
|
-
"begin": "(?<=^|{|,)\\s*+(('
|
|
324
|
+
"begin": "(?<=^|{|,)\\s*+(('|\")([^\"']*)(\\k<-3>))\\s*+(:)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+([_$a-zA-Z][$\\w]*)\\s*+(((?::(?:(\\s*+(&|\\|)?(\\s*+[$_a-zA-Z0-9]+(<(?:(?>[^<>]+)|\\g<-1>)*>)?|\\s*+({(?:(?>[^{}]+)|\\g<-1>)*\\})|\\s*+(\\[(?:(?>[^\\[\\]]+)|\\g<-1>)*\\])|\\s*+(\\s*([\"']).*?\\k<-1>(?<!\\\\.))|\\s*[x0-9A-Fa-f]+))|(?:\\s*+/\\*.*?\\*/))*+)*)|(?:/\\*.*?\\*/))\\s*=>)",
|
|
324
325
|
"end": "\\s*(=>)",
|
|
325
326
|
"beginCaptures": {
|
|
326
327
|
"1": {
|
|
@@ -362,7 +363,7 @@
|
|
|
362
363
|
"patterns": [
|
|
363
364
|
{
|
|
364
365
|
"comment": "string as a property name",
|
|
365
|
-
"match": "\\s*+(?<!\\.|\\?|\\?\\s|\\?\\s\\s)(((
|
|
366
|
+
"match": "\\s*+(?<!\\.|\\?|\\?\\s|\\?\\s\\s)(((\")(\\\\.|[^\\\\\"])*(\"))|((')(\\\\.|[^\\\\'])*(')))\\s*+(:)",
|
|
366
367
|
"captures": {
|
|
367
368
|
"1": {
|
|
368
369
|
"name": "constant.other.object.key.js"
|
|
@@ -433,7 +434,6 @@
|
|
|
433
434
|
"include": "#literal-keyword-storage"
|
|
434
435
|
},
|
|
435
436
|
{
|
|
436
|
-
"name": "keyword.control.flow.js",
|
|
437
437
|
"match": "\\s*+(?<!\\.)\\b(yield)\\b(?:\\s*+(\\*))?",
|
|
438
438
|
"captures": {
|
|
439
439
|
"1": {
|
|
@@ -445,20 +445,36 @@
|
|
|
445
445
|
}
|
|
446
446
|
},
|
|
447
447
|
{
|
|
448
|
-
"
|
|
449
|
-
"
|
|
448
|
+
"match": "\\s*+(?<!\\.)\\b(await|return)\\b",
|
|
449
|
+
"captures": {
|
|
450
|
+
"1": {
|
|
451
|
+
"name": "keyword.control.flow.js"
|
|
452
|
+
}
|
|
453
|
+
}
|
|
450
454
|
},
|
|
451
455
|
{
|
|
452
|
-
"
|
|
453
|
-
"
|
|
456
|
+
"match": "\\s*+(?<!\\.)\\b(if|else)\\b",
|
|
457
|
+
"captures": {
|
|
458
|
+
"1": {
|
|
459
|
+
"name": "keyword.control.conditional.js"
|
|
460
|
+
}
|
|
461
|
+
}
|
|
454
462
|
},
|
|
455
463
|
{
|
|
456
|
-
"
|
|
457
|
-
"
|
|
464
|
+
"match": "\\s*+(?<!\\.)\\b(catch|finally|throw|try)\\b",
|
|
465
|
+
"captures": {
|
|
466
|
+
"1": {
|
|
467
|
+
"name": "keyword.control.trycatch.js"
|
|
468
|
+
}
|
|
469
|
+
}
|
|
458
470
|
},
|
|
459
471
|
{
|
|
460
|
-
"
|
|
461
|
-
"
|
|
472
|
+
"match": "\\s*+(?<!\\.)\\b(break|continue|do|goto|while)\\b",
|
|
473
|
+
"captures": {
|
|
474
|
+
"1": {
|
|
475
|
+
"name": "keyword.control.loop.js"
|
|
476
|
+
}
|
|
477
|
+
}
|
|
462
478
|
}
|
|
463
479
|
]
|
|
464
480
|
},
|
|
@@ -467,9 +483,9 @@
|
|
|
467
483
|
{
|
|
468
484
|
"name": "meta.for.js",
|
|
469
485
|
"begin": "\\s*+(?<!\\.)\\b(for)\\b",
|
|
470
|
-
"end": "\\s
|
|
486
|
+
"end": "\\s*(\\))",
|
|
471
487
|
"endCaptures": {
|
|
472
|
-
"
|
|
488
|
+
"1": {
|
|
473
489
|
"name": "meta.brace.round.js"
|
|
474
490
|
}
|
|
475
491
|
},
|
|
@@ -480,10 +496,10 @@
|
|
|
480
496
|
},
|
|
481
497
|
"patterns": [
|
|
482
498
|
{
|
|
483
|
-
"begin": "\\s
|
|
499
|
+
"begin": "\\s*+(\\()",
|
|
484
500
|
"end": "\\s*(?=\\))",
|
|
485
501
|
"beginCaptures": {
|
|
486
|
-
"
|
|
502
|
+
"1": {
|
|
487
503
|
"name": "meta.brace.round.js"
|
|
488
504
|
}
|
|
489
505
|
},
|
|
@@ -508,14 +524,14 @@
|
|
|
508
524
|
{
|
|
509
525
|
"name": "meta.switch.js",
|
|
510
526
|
"begin": "\\s*+(?<!\\.)\\b(switch)\\b",
|
|
511
|
-
"end": "\\s
|
|
527
|
+
"end": "\\s*(\\})",
|
|
512
528
|
"beginCaptures": {
|
|
513
529
|
"1": {
|
|
514
530
|
"name": "keyword.control.switch.js"
|
|
515
531
|
}
|
|
516
532
|
},
|
|
517
533
|
"endCaptures": {
|
|
518
|
-
"
|
|
534
|
+
"1": {
|
|
519
535
|
"name": "meta.brace.curly.js"
|
|
520
536
|
}
|
|
521
537
|
},
|
|
@@ -524,10 +540,10 @@
|
|
|
524
540
|
"include": "#round-brackets"
|
|
525
541
|
},
|
|
526
542
|
{
|
|
527
|
-
"begin": "\\s
|
|
543
|
+
"begin": "\\s*+({)",
|
|
528
544
|
"end": "\\s*(?=})",
|
|
529
545
|
"beginCaptures": {
|
|
530
|
-
"
|
|
546
|
+
"1": {
|
|
531
547
|
"name": "meta.brace.curly.js"
|
|
532
548
|
}
|
|
533
549
|
},
|
|
@@ -578,14 +594,14 @@
|
|
|
578
594
|
{
|
|
579
595
|
"comment": "try to avoid ternary operators which have a '? some chars :'",
|
|
580
596
|
"begin": "(^|:|;|=|(?<=:|;|=))\\s*+(\\((?=((\"|').*?(?<=[^\\\\])\\k<-1>|[^?:])*(:|\\?\\s*+:)))",
|
|
581
|
-
"end": "\\s
|
|
597
|
+
"end": "\\s*(\\))",
|
|
582
598
|
"beginCaptures": {
|
|
583
599
|
"2": {
|
|
584
600
|
"name": "meta.brace.round.js"
|
|
585
601
|
}
|
|
586
602
|
},
|
|
587
603
|
"endCaptures": {
|
|
588
|
-
"
|
|
604
|
+
"1": {
|
|
589
605
|
"name": "meta.brace.round.js"
|
|
590
606
|
}
|
|
591
607
|
},
|
|
@@ -599,15 +615,15 @@
|
|
|
599
615
|
]
|
|
600
616
|
},
|
|
601
617
|
{
|
|
602
|
-
"begin": "\\s
|
|
603
|
-
"end": "\\s
|
|
618
|
+
"begin": "\\s*+(\\()",
|
|
619
|
+
"end": "\\s*(\\))",
|
|
604
620
|
"endCaptures": {
|
|
605
|
-
"
|
|
621
|
+
"1": {
|
|
606
622
|
"name": "meta.brace.round.js"
|
|
607
623
|
}
|
|
608
624
|
},
|
|
609
625
|
"beginCaptures": {
|
|
610
|
-
"
|
|
626
|
+
"1": {
|
|
611
627
|
"name": "meta.brace.round.js"
|
|
612
628
|
}
|
|
613
629
|
},
|
|
@@ -622,15 +638,15 @@
|
|
|
622
638
|
"square-brackets": {
|
|
623
639
|
"patterns": [
|
|
624
640
|
{
|
|
625
|
-
"begin": "\\s
|
|
626
|
-
"end": "\\s
|
|
641
|
+
"begin": "\\s*+(\\[)",
|
|
642
|
+
"end": "\\s*(\\])",
|
|
627
643
|
"endCaptures": {
|
|
628
|
-
"
|
|
644
|
+
"1": {
|
|
629
645
|
"name": "meta.brace.square.js"
|
|
630
646
|
}
|
|
631
647
|
},
|
|
632
648
|
"beginCaptures": {
|
|
633
|
-
"
|
|
649
|
+
"1": {
|
|
634
650
|
"name": "meta.brace.square.js"
|
|
635
651
|
}
|
|
636
652
|
},
|
|
@@ -645,15 +661,15 @@
|
|
|
645
661
|
"curly-brackets": {
|
|
646
662
|
"patterns": [
|
|
647
663
|
{
|
|
648
|
-
"begin": "\\s
|
|
649
|
-
"end": "\\s
|
|
664
|
+
"begin": "\\s*+({)",
|
|
665
|
+
"end": "\\s*(\\})",
|
|
650
666
|
"endCaptures": {
|
|
651
|
-
"
|
|
667
|
+
"1": {
|
|
652
668
|
"name": "meta.brace.curly.js"
|
|
653
669
|
}
|
|
654
670
|
},
|
|
655
671
|
"beginCaptures": {
|
|
656
|
-
"
|
|
672
|
+
"1": {
|
|
657
673
|
"name": "meta.brace.curly.js"
|
|
658
674
|
}
|
|
659
675
|
},
|
|
@@ -686,15 +702,21 @@
|
|
|
686
702
|
},
|
|
687
703
|
"comments": {
|
|
688
704
|
"patterns": [
|
|
705
|
+
{
|
|
706
|
+
"include": "#flowtype-comments"
|
|
707
|
+
},
|
|
689
708
|
{
|
|
690
709
|
"include": "#special-comments-conditional-compilation"
|
|
691
710
|
},
|
|
692
711
|
{
|
|
693
|
-
"
|
|
694
|
-
"begin": "\\s
|
|
695
|
-
"end": "\\s
|
|
712
|
+
"contentName": "comment.block.documentation.js",
|
|
713
|
+
"begin": "\\s*+((/\\*\\*))(?!/)",
|
|
714
|
+
"end": "(\\s*(\\*/))",
|
|
696
715
|
"captures": {
|
|
697
|
-
"
|
|
716
|
+
"1": {
|
|
717
|
+
"name": "comment.block.documentation.js"
|
|
718
|
+
},
|
|
719
|
+
"2": {
|
|
698
720
|
"name": "punctuation.definition.comment.js"
|
|
699
721
|
}
|
|
700
722
|
},
|
|
@@ -705,32 +727,45 @@
|
|
|
705
727
|
]
|
|
706
728
|
},
|
|
707
729
|
{
|
|
708
|
-
"
|
|
709
|
-
"begin": "\\s
|
|
710
|
-
"end": "\\s
|
|
730
|
+
"contentName": "comment.block.js",
|
|
731
|
+
"begin": "\\s*+((/\\*))",
|
|
732
|
+
"end": "(\\s*(\\*/))",
|
|
711
733
|
"captures": {
|
|
712
|
-
"
|
|
734
|
+
"1": {
|
|
735
|
+
"name": "comment.block.js"
|
|
736
|
+
},
|
|
737
|
+
"2": {
|
|
713
738
|
"name": "punctuation.definition.comment.js"
|
|
714
739
|
}
|
|
715
740
|
}
|
|
716
741
|
},
|
|
717
742
|
{
|
|
718
|
-
"
|
|
719
|
-
"match": "\\s*+(<!--|-->)",
|
|
743
|
+
"match": "\\s*+((<!--|-->))",
|
|
720
744
|
"captures": {
|
|
721
|
-
"
|
|
745
|
+
"1": {
|
|
746
|
+
"name": "comment.block.html.js"
|
|
747
|
+
},
|
|
748
|
+
"2": {
|
|
722
749
|
"name": "punctuation.definition.comment.js"
|
|
723
750
|
}
|
|
724
751
|
}
|
|
725
752
|
},
|
|
726
753
|
{
|
|
727
|
-
"
|
|
728
|
-
"begin": "\\s*+(//)",
|
|
754
|
+
"contentName": "comment.line.double-slash.js",
|
|
755
|
+
"begin": "\\s*+((//))",
|
|
729
756
|
"end": "\\s*$",
|
|
730
757
|
"beginCaptures": {
|
|
731
758
|
"1": {
|
|
759
|
+
"name": "comment.line.double-slash.js"
|
|
760
|
+
},
|
|
761
|
+
"2": {
|
|
732
762
|
"name": "punctuation.definition.comment.js"
|
|
733
763
|
}
|
|
764
|
+
},
|
|
765
|
+
"endCaptures": {
|
|
766
|
+
"0": {
|
|
767
|
+
"name": "comment.line.double-slash.js"
|
|
768
|
+
}
|
|
734
769
|
}
|
|
735
770
|
},
|
|
736
771
|
{
|
|
@@ -747,11 +782,14 @@
|
|
|
747
782
|
"special-comments-conditional-compilation": {
|
|
748
783
|
"patterns": [
|
|
749
784
|
{
|
|
750
|
-
"
|
|
751
|
-
"begin": "\\s
|
|
785
|
+
"contentName": "comment.block.conditional.js",
|
|
786
|
+
"begin": "\\s*+((/\\*))(?=@)",
|
|
752
787
|
"end": "\\s*\\*/",
|
|
753
788
|
"captures": {
|
|
754
|
-
"
|
|
789
|
+
"1": {
|
|
790
|
+
"name": "comment.block.conditional.js"
|
|
791
|
+
},
|
|
792
|
+
"2": {
|
|
755
793
|
"name": "punctuation.definition.comment.js"
|
|
756
794
|
}
|
|
757
795
|
},
|
|
@@ -806,16 +844,24 @@
|
|
|
806
844
|
"literal-semi-colon": {
|
|
807
845
|
"patterns": [
|
|
808
846
|
{
|
|
809
|
-
"
|
|
810
|
-
"
|
|
847
|
+
"match": "\\s*+(;)",
|
|
848
|
+
"captures": {
|
|
849
|
+
"1": {
|
|
850
|
+
"name": "punctuation.terminator.statement.js"
|
|
851
|
+
}
|
|
852
|
+
}
|
|
811
853
|
}
|
|
812
854
|
]
|
|
813
855
|
},
|
|
814
856
|
"literal-comma": {
|
|
815
857
|
"patterns": [
|
|
816
858
|
{
|
|
817
|
-
"
|
|
818
|
-
"
|
|
859
|
+
"match": "\\s*+(,)",
|
|
860
|
+
"captures": {
|
|
861
|
+
"1": {
|
|
862
|
+
"name": "meta.delimiter.comma.js"
|
|
863
|
+
}
|
|
864
|
+
}
|
|
819
865
|
}
|
|
820
866
|
]
|
|
821
867
|
},
|
|
@@ -823,7 +869,7 @@
|
|
|
823
869
|
"patterns": [
|
|
824
870
|
{
|
|
825
871
|
"begin": "\\s*+(?<!\\.)\\b(const|let|var)\\b",
|
|
826
|
-
"end": "\\s*(
|
|
872
|
+
"end": "\\s*(?=;|\\b(if|switch|try|var|let|const|static|function|return|class|do|for|while|debugger|export|import|yield|type|declare|interface)\\b|\\)|})",
|
|
827
873
|
"beginCaptures": {
|
|
828
874
|
"1": {
|
|
829
875
|
"name": "storage.type.js"
|
|
@@ -833,7 +879,7 @@
|
|
|
833
879
|
{
|
|
834
880
|
"comment": "other variables",
|
|
835
881
|
"begin": "\\s*",
|
|
836
|
-
"end": "\\s*((,)|(?=(
|
|
882
|
+
"end": "\\s*((,)|(?=(;)|\\b(if|switch|try|var|let|const|static|function|return|class|do|for|while|debugger|export|import|yield|type|declare|interface)\\b|\\)|}))",
|
|
837
883
|
"endCaptures": {
|
|
838
884
|
"2": {
|
|
839
885
|
"name": "punctuation.terminator.statement.js"
|
|
@@ -855,7 +901,7 @@
|
|
|
855
901
|
"comment": "e.g. function play<T>(arg1, arg2) { }",
|
|
856
902
|
"name": "meta.function.js",
|
|
857
903
|
"begin": "\\s*+(?:\\b(async)\\b\\s+)?\\s*+(?:(?<=\\.\\.\\.)|(?<!\\.))(\\bfunction\\b)\\s*+(\\*?)\\s*+([_$a-zA-Z][$\\w]*)?\\s*+(?=\\(|<)",
|
|
858
|
-
"end": "\\s*(
|
|
904
|
+
"end": "\\s*(?=;|{|\\b(if|switch|try|var|let|const|static|function|return|class|do|for|while|debugger|export|import|yield|type|declare|interface)\\b|\\)|})",
|
|
859
905
|
"applyEndPatternLast": 1,
|
|
860
906
|
"beginCaptures": {
|
|
861
907
|
"1": {
|
|
@@ -881,7 +927,7 @@
|
|
|
881
927
|
"comment": "e.g. play = function(arg1, arg2) { }",
|
|
882
928
|
"name": "meta.function.js",
|
|
883
929
|
"begin": "\\s*+(\\b[_$a-zA-Z][$\\w]*)\\s*+(=)\\s*+(?:(async)\\s+)?\\s*+((?<!\\.)\\bfunction\\b)\\s*+(\\*?)\\s*+([_$a-zA-Z][$\\w]*)?\\s*+(?=\\(|<)",
|
|
884
|
-
"end": "\\s*(
|
|
930
|
+
"end": "\\s*(?=;|{|\\b(if|switch|try|var|let|const|static|function|return|class|do|for|while|debugger|export|import|yield|type|declare|interface)\\b|\\)|})",
|
|
885
931
|
"applyEndPatternLast": 1,
|
|
886
932
|
"beginCaptures": {
|
|
887
933
|
"1": {
|
|
@@ -913,7 +959,7 @@
|
|
|
913
959
|
"comment": "e.g. Sound.prototype.play = function(arg1, arg2) { }",
|
|
914
960
|
"name": "meta.prototype.function.js",
|
|
915
961
|
"begin": "\\s*+(\\b_?[A-Z][$\\w]*)?(\\.)(prototype)(\\.)([_$a-zA-Z][$\\w]*)\\s*+(=)\\s*+(?:(async)\\s+)?\\s*+((?<!\\.)\\bfunction\\b)\\s*+(\\*?)\\s*+([_$a-zA-Z][$\\w]*)?\\s*+(?=\\(|<)",
|
|
916
|
-
"end": "\\s*(
|
|
962
|
+
"end": "\\s*(?=;|{|\\b(if|switch|try|var|let|const|static|function|return|class|do|for|while|debugger|export|import|yield|type|declare|interface)\\b|\\)|})",
|
|
917
963
|
"applyEndPatternLast": 1,
|
|
918
964
|
"beginCaptures": {
|
|
919
965
|
"1": {
|
|
@@ -957,7 +1003,7 @@
|
|
|
957
1003
|
"comment": "e.g. Sound.play = function(arg1, arg2) { }",
|
|
958
1004
|
"name": "meta.function.static.js",
|
|
959
1005
|
"begin": "\\s*+(\\b_?[A-Z][$\\w]*)?(\\.)([_$a-zA-Z][$\\w]*)\\s*+(=)\\s*+(?:(async)\\s+)?\\s*+((?<!\\.)\\bfunction\\b)\\s*+(\\*?)\\s*+([_$a-zA-Z][$\\w]*)?\\s*+(?=\\(|<)",
|
|
960
|
-
"end": "\\s*(
|
|
1006
|
+
"end": "\\s*(?=;|{|\\b(if|switch|try|var|let|const|static|function|return|class|do|for|while|debugger|export|import|yield|type|declare|interface)\\b|\\)|})",
|
|
961
1007
|
"applyEndPatternLast": 1,
|
|
962
1008
|
"beginCaptures": {
|
|
963
1009
|
"1": {
|
|
@@ -1077,6 +1123,9 @@
|
|
|
1077
1123
|
}
|
|
1078
1124
|
},
|
|
1079
1125
|
"patterns": [
|
|
1126
|
+
{
|
|
1127
|
+
"include": "#html-template"
|
|
1128
|
+
},
|
|
1080
1129
|
{
|
|
1081
1130
|
"include": "#literal-function-labels"
|
|
1082
1131
|
},
|
|
@@ -1105,36 +1154,71 @@
|
|
|
1105
1154
|
"literal-operators": {
|
|
1106
1155
|
"patterns": [
|
|
1107
1156
|
{
|
|
1108
|
-
"
|
|
1109
|
-
|
|
1157
|
+
"include": "#es7-function-bind"
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
"match": "\\s*+(?<!\\.)\\b(delete|in|instanceof|new|of|typeof|void|with)\\b",
|
|
1161
|
+
"captures": {
|
|
1162
|
+
"1": {
|
|
1163
|
+
"name": "keyword.operator.js"
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1110
1166
|
},
|
|
1111
1167
|
{
|
|
1112
|
-
"
|
|
1113
|
-
"
|
|
1168
|
+
"match": "\\s*+(!(?!=)|&&|\\|\\|)",
|
|
1169
|
+
"captures": {
|
|
1170
|
+
"1": {
|
|
1171
|
+
"name": "keyword.operator.logical.js"
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1114
1174
|
},
|
|
1115
1175
|
{
|
|
1116
|
-
"
|
|
1117
|
-
"
|
|
1176
|
+
"match": "\\s*+(=(?!(=|>)))",
|
|
1177
|
+
"captures": {
|
|
1178
|
+
"1": {
|
|
1179
|
+
"name": "keyword.operator.assignment.js"
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1118
1182
|
},
|
|
1119
1183
|
{
|
|
1120
|
-
"
|
|
1121
|
-
"
|
|
1184
|
+
"match": "\\s*+(%=|&=|\\*=|\\+=|-=|/=|\\^=|\\|=|<<=|>>=|>>>=)",
|
|
1185
|
+
"captures": {
|
|
1186
|
+
"1": {
|
|
1187
|
+
"name": "keyword.operator.assignment.augmented.js"
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1122
1190
|
},
|
|
1123
1191
|
{
|
|
1124
|
-
"
|
|
1125
|
-
"
|
|
1192
|
+
"match": "\\s*+(~|<<|>>>|>>|&|\\^|\\|)",
|
|
1193
|
+
"captures": {
|
|
1194
|
+
"1": {
|
|
1195
|
+
"name": "keyword.operator.bitwise.js"
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1126
1198
|
},
|
|
1127
1199
|
{
|
|
1128
|
-
"
|
|
1129
|
-
"
|
|
1200
|
+
"match": "\\s*+(<=|>=|<|>)",
|
|
1201
|
+
"captures": {
|
|
1202
|
+
"1": {
|
|
1203
|
+
"name": "keyword.operator.relational.js"
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1130
1206
|
},
|
|
1131
1207
|
{
|
|
1132
|
-
"
|
|
1133
|
-
"
|
|
1208
|
+
"match": "\\s*+(===|!==|==|!=)",
|
|
1209
|
+
"captures": {
|
|
1210
|
+
"1": {
|
|
1211
|
+
"name": "keyword.operator.comparison.js"
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1134
1214
|
},
|
|
1135
1215
|
{
|
|
1136
|
-
"
|
|
1137
|
-
"
|
|
1216
|
+
"match": "\\s*+(--|\\+\\+|/(?!/|\\*)|%|\\*(?<!/\\*)|\\+|-)",
|
|
1217
|
+
"captures": {
|
|
1218
|
+
"1": {
|
|
1219
|
+
"name": "keyword.operator.arithmetic.js"
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1138
1222
|
},
|
|
1139
1223
|
{
|
|
1140
1224
|
"comment": "ternary operator - make sure end : is consumed to avoid mistake as flow type",
|
|
@@ -1157,8 +1241,12 @@
|
|
|
1157
1241
|
]
|
|
1158
1242
|
},
|
|
1159
1243
|
{
|
|
1160
|
-
"
|
|
1161
|
-
"
|
|
1244
|
+
"match": "\\s*+(?<!\\.)(\\.\\.\\.)",
|
|
1245
|
+
"captures": {
|
|
1246
|
+
"1": {
|
|
1247
|
+
"name": "keyword.operator.spread.js"
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1162
1250
|
},
|
|
1163
1251
|
{
|
|
1164
1252
|
"name": "keyword.operator.accessor.js",
|
|
@@ -1252,56 +1340,84 @@
|
|
|
1252
1340
|
"literal-language-constant": {
|
|
1253
1341
|
"patterns": [
|
|
1254
1342
|
{
|
|
1255
|
-
"
|
|
1256
|
-
"
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1343
|
+
"match": "\\s*+(?<!\\.)\\b((true)|(false)|(null)|(undefined)|(NaN))\\b",
|
|
1344
|
+
"captures": {
|
|
1345
|
+
"2": {
|
|
1346
|
+
"name": "constant.language.boolean.true.js"
|
|
1347
|
+
},
|
|
1348
|
+
"3": {
|
|
1349
|
+
"name": "constant.language.boolean.false.js"
|
|
1350
|
+
},
|
|
1351
|
+
"4": {
|
|
1352
|
+
"name": "constant.language.null.js"
|
|
1353
|
+
},
|
|
1354
|
+
"5": {
|
|
1355
|
+
"name": "constant.language.undefined.js"
|
|
1356
|
+
},
|
|
1357
|
+
"6": {
|
|
1358
|
+
"name": "constant.language.nan.js"
|
|
1359
|
+
}
|
|
1360
|
+
}
|
|
1273
1361
|
}
|
|
1274
1362
|
]
|
|
1275
1363
|
},
|
|
1276
1364
|
"support": {
|
|
1277
1365
|
"patterns": [
|
|
1278
1366
|
{
|
|
1279
|
-
"
|
|
1280
|
-
"
|
|
1367
|
+
"match": "\\s*+\\b(Array|ArrayBuffer|Boolean|DataView|Date|Float(32|64)Array|Int(8|16|32)Array|Function|GeneratorFunction|Map|Math|Number|Object|Promise|Proxy|RegExp|Set|String|Uint(8|16|32)Array|Uint8ClampedArray|WeakMap|WeakSet)\\b",
|
|
1368
|
+
"captures": {
|
|
1369
|
+
"1": {
|
|
1370
|
+
"name": "support.class.builtin.js"
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1281
1373
|
},
|
|
1282
1374
|
{
|
|
1283
|
-
"
|
|
1284
|
-
"
|
|
1375
|
+
"match": "\\s*+(?<!\\.)\\b(decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|isFinite|isNaN|parseFloat|parseInt|unescape)\\b",
|
|
1376
|
+
"captures": {
|
|
1377
|
+
"1": {
|
|
1378
|
+
"name": "support.function.js"
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1285
1381
|
},
|
|
1286
1382
|
{
|
|
1287
|
-
"
|
|
1288
|
-
"
|
|
1383
|
+
"match": "(?<=\\.)(shift|sort|splice|unshift|pop|push|reverse)\\b",
|
|
1384
|
+
"captures": {
|
|
1385
|
+
"1": {
|
|
1386
|
+
"name": "support.function.mutator.js"
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1289
1389
|
},
|
|
1290
1390
|
{
|
|
1291
|
-
"
|
|
1292
|
-
"
|
|
1391
|
+
"match": "\\s*+(?<!\\.)\\b((Eval|Range|Reference|Syntax|Type|URI)?Error)\\b",
|
|
1392
|
+
"captures": {
|
|
1393
|
+
"1": {
|
|
1394
|
+
"name": "support.class.error.js"
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1293
1397
|
},
|
|
1294
1398
|
{
|
|
1295
|
-
"
|
|
1296
|
-
"
|
|
1399
|
+
"match": "\\s*+(?<!\\.)\\b(debugger)\\b",
|
|
1400
|
+
"captures": {
|
|
1401
|
+
"1": {
|
|
1402
|
+
"name": "keyword.other.js"
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1297
1405
|
},
|
|
1298
1406
|
{
|
|
1299
|
-
"
|
|
1300
|
-
"
|
|
1407
|
+
"match": "\\s*+(?<!\\.)\\b(document|window)\\b",
|
|
1408
|
+
"captures": {
|
|
1409
|
+
"1": {
|
|
1410
|
+
"name": "support.type.object.dom.js"
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1301
1413
|
},
|
|
1302
1414
|
{
|
|
1303
|
-
"
|
|
1304
|
-
"
|
|
1415
|
+
"match": "\\s*+\\b(ELEMENT_NODE|ATTRIBUTE_NODE|TEXT_NODE|CDATA_SECTION_NODE|ENTITY_REFERENCE_NODE|ENTITY_NODE|PROCESSING_INSTRUCTION_NODE|COMMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE|DOCUMENT_FRAGMENT_NODE|NOTATION_NODE|INDEX_SIZE_ERR|DOMSTRING_SIZE_ERR|HIERARCHY_REQUEST_ERR|WRONG_DOCUMENT_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR|NOT_SUPPORTED_ERR|INUSE_ATTRIBUTE_ERR)\\b",
|
|
1416
|
+
"captures": {
|
|
1417
|
+
"1": {
|
|
1418
|
+
"name": "support.constant.dom.js"
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1305
1421
|
},
|
|
1306
1422
|
{
|
|
1307
1423
|
"match": "\\s*+(?<!\\.)\\b(console)(?:(\\.)(warn|info|log|error|time|timeEnd|assert))?\\b",
|
|
@@ -1360,17 +1476,30 @@
|
|
|
1360
1476
|
}
|
|
1361
1477
|
},
|
|
1362
1478
|
{
|
|
1363
|
-
"
|
|
1364
|
-
"
|
|
1479
|
+
"match": "\\s*+(?<!\\.)\\b(global|GLOBAL|root|__dirname|__filename)\\b",
|
|
1480
|
+
"captures": {
|
|
1481
|
+
"1": {
|
|
1482
|
+
"name": "support.type.object.node.js"
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1365
1485
|
},
|
|
1366
1486
|
{
|
|
1367
|
-
"
|
|
1368
|
-
"
|
|
1487
|
+
"match": "\\s*+\\b(Buffer|EventEmitter|Server|Pipe|Socket|REPLServer|ReadStream|WriteStream|Stream|Inflate|Deflate|InflateRaw|DeflateRaw|GZip|GUnzip|Unzip|Zip)\\b",
|
|
1488
|
+
"captures": {
|
|
1489
|
+
"1": {
|
|
1490
|
+
"name": "support.class.node.js"
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1369
1493
|
},
|
|
1370
1494
|
{
|
|
1371
|
-
"
|
|
1372
|
-
"begin": "\\s*+{{",
|
|
1373
|
-
"end": "\\s*}}"
|
|
1495
|
+
"contentName": "meta.tag.mustache.js",
|
|
1496
|
+
"begin": "\\s*+({{)",
|
|
1497
|
+
"end": "(\\s*}})",
|
|
1498
|
+
"captures": {
|
|
1499
|
+
"1": {
|
|
1500
|
+
"name": "meta.tag.mustache.js"
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1374
1503
|
}
|
|
1375
1504
|
]
|
|
1376
1505
|
},
|
|
@@ -1378,24 +1507,24 @@
|
|
|
1378
1507
|
"patterns": [
|
|
1379
1508
|
{
|
|
1380
1509
|
"comment": "Classes",
|
|
1381
|
-
"begin": "\\s*+(?<!\\.)\\b(class)\\s+",
|
|
1510
|
+
"begin": "\\s*+(?<!\\.)\\b((class))\\s+",
|
|
1382
1511
|
"end": "\\s*(?<=})",
|
|
1383
1512
|
"beginCaptures": {
|
|
1384
|
-
"
|
|
1513
|
+
"1": {
|
|
1385
1514
|
"name": "meta.class.js"
|
|
1386
1515
|
},
|
|
1387
|
-
"
|
|
1516
|
+
"2": {
|
|
1388
1517
|
"name": "storage.type.class.js"
|
|
1389
1518
|
}
|
|
1390
1519
|
},
|
|
1391
1520
|
"patterns": [
|
|
1392
1521
|
{
|
|
1393
|
-
"match": "\\s*+\\b(extends)\\b\\s*+",
|
|
1522
|
+
"match": "\\s*+\\b((extends))\\b\\s*+",
|
|
1394
1523
|
"captures": {
|
|
1395
|
-
"
|
|
1524
|
+
"1": {
|
|
1396
1525
|
"name": "meta.class.extends.js"
|
|
1397
1526
|
},
|
|
1398
|
-
"
|
|
1527
|
+
"2": {
|
|
1399
1528
|
"name": "storage.type.extends.js"
|
|
1400
1529
|
}
|
|
1401
1530
|
}
|
|
@@ -1403,17 +1532,21 @@
|
|
|
1403
1532
|
{
|
|
1404
1533
|
"comment": "look for classes names but dont assume uppercase start char",
|
|
1405
1534
|
"match": "(?<!\\.)\\s*+([$_\\p{L}](?:[$\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}])*+)",
|
|
1406
|
-
"
|
|
1535
|
+
"captures": {
|
|
1536
|
+
"1": {
|
|
1537
|
+
"name": "entity.name.class.js"
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1407
1540
|
},
|
|
1408
1541
|
{
|
|
1409
1542
|
"include": "#flowtype-polymorphs"
|
|
1410
1543
|
},
|
|
1411
1544
|
{
|
|
1412
|
-
"begin": "\\s*+{",
|
|
1545
|
+
"begin": "\\s*+({)",
|
|
1413
1546
|
"end": "\\s*(})",
|
|
1414
1547
|
"contentName": "meta.class.body.js",
|
|
1415
1548
|
"beginCaptures": {
|
|
1416
|
-
"
|
|
1549
|
+
"1": {
|
|
1417
1550
|
"name": "punctuation.section.class.begin.js"
|
|
1418
1551
|
}
|
|
1419
1552
|
},
|
|
@@ -1468,8 +1601,12 @@
|
|
|
1468
1601
|
]
|
|
1469
1602
|
},
|
|
1470
1603
|
{
|
|
1471
|
-
"match": "\\s
|
|
1472
|
-
"
|
|
1604
|
+
"match": "\\s*+(?<!\\.)\\b(static)\\b(?!\\.)",
|
|
1605
|
+
"captures": {
|
|
1606
|
+
"1": {
|
|
1607
|
+
"name": "storage.modifier.js"
|
|
1608
|
+
}
|
|
1609
|
+
}
|
|
1473
1610
|
},
|
|
1474
1611
|
{
|
|
1475
1612
|
"include": "#flowtype-variable"
|
|
@@ -1555,32 +1692,60 @@
|
|
|
1555
1692
|
"literal-language-variable": {
|
|
1556
1693
|
"patterns": [
|
|
1557
1694
|
{
|
|
1558
|
-
"
|
|
1559
|
-
"
|
|
1695
|
+
"match": "\\s*+(?<!(?<!\\.\\.)\\.)\\b(arguments)\\b",
|
|
1696
|
+
"captures": {
|
|
1697
|
+
"1": {
|
|
1698
|
+
"name": "variable.language.arguments.js"
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1560
1701
|
},
|
|
1561
1702
|
{
|
|
1562
|
-
"
|
|
1563
|
-
"
|
|
1703
|
+
"match": "\\s*+(?<!(?<!\\.\\.)\\.)\\b(super)\\b\\s*+(?!\\()",
|
|
1704
|
+
"captures": {
|
|
1705
|
+
"1": {
|
|
1706
|
+
"name": "variable.language.super.js"
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1564
1709
|
},
|
|
1565
1710
|
{
|
|
1566
|
-
"
|
|
1567
|
-
"
|
|
1711
|
+
"match": "\\s*+(?<!(?<!\\.\\.)\\.)\\b(this)\\b",
|
|
1712
|
+
"captures": {
|
|
1713
|
+
"1": {
|
|
1714
|
+
"name": "variable.language.this.js"
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1568
1717
|
},
|
|
1569
1718
|
{
|
|
1570
|
-
"
|
|
1571
|
-
"
|
|
1719
|
+
"match": "\\s*+(?<!(?<!\\.\\.)\\.)\\b(self)\\b\\s*+(?!\\()",
|
|
1720
|
+
"captures": {
|
|
1721
|
+
"1": {
|
|
1722
|
+
"name": "variable.language.self.js"
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1572
1725
|
},
|
|
1573
1726
|
{
|
|
1574
|
-
"
|
|
1575
|
-
"
|
|
1727
|
+
"match": "\\s*+(?<=\\.)\\b(__proto__)\\b",
|
|
1728
|
+
"captures": {
|
|
1729
|
+
"1": {
|
|
1730
|
+
"name": "variable.language.proto.js"
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1576
1733
|
},
|
|
1577
1734
|
{
|
|
1578
|
-
"
|
|
1579
|
-
"
|
|
1735
|
+
"match": "\\s*+(?<=\\.)\\b(constructor)\\b\\s*+(?!\\()",
|
|
1736
|
+
"captures": {
|
|
1737
|
+
"1": {
|
|
1738
|
+
"name": "variable.language.constructor.js"
|
|
1739
|
+
}
|
|
1740
|
+
}
|
|
1580
1741
|
},
|
|
1581
1742
|
{
|
|
1582
|
-
"
|
|
1583
|
-
"
|
|
1743
|
+
"match": "\\s*+(?<=\\.)\\b(prototype)\\b",
|
|
1744
|
+
"captures": {
|
|
1745
|
+
"1": {
|
|
1746
|
+
"name": "variable.language.prototype.js"
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1584
1749
|
}
|
|
1585
1750
|
]
|
|
1586
1751
|
},
|
|
@@ -1596,7 +1761,7 @@
|
|
|
1596
1761
|
},
|
|
1597
1762
|
{
|
|
1598
1763
|
"name": "constant.character.escape",
|
|
1599
|
-
"match": "\\\\u((
|
|
1764
|
+
"match": "\\\\u(({[0-9a-fA-F]+\\})|[0-9a-fA-F]{4})"
|
|
1600
1765
|
},
|
|
1601
1766
|
{
|
|
1602
1767
|
"name": "constant.character.escape",
|
|
@@ -1657,7 +1822,7 @@
|
|
|
1657
1822
|
{
|
|
1658
1823
|
"comment": "e.g. (args) => { }",
|
|
1659
1824
|
"name": "meta.function.arrow.js",
|
|
1660
|
-
"begin": "\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\g<-1>)*\\))\\s*+(
|
|
1825
|
+
"begin": "\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\g<-1>)*\\))\\s*+(((?::(?:(\\s*+(&|\\|)?(\\s*+[$_a-zA-Z0-9]+(<(?:(?>[^<>]+)|\\g<-1>)*>)?|\\s*+({(?:(?>[^{}]+)|\\g<-1>)*\\})|\\s*+(\\[(?:(?>[^\\[\\]]+)|\\g<-1>)*\\])|\\s*+(\\s*([\"']).*?\\k<-1>(?<!\\\\.))|\\s*[x0-9A-Fa-f]+))|(?:\\s*+/\\*.*?\\*/))*+)*)|(?:/\\*.*?\\*/))(((?<=checks)|(\\s*\\bchecks))\\b\\s*(\\((?:(?>[^()]+)|\\g<-1>)*\\))?)?\\s*=>)",
|
|
1661
1826
|
"end": "\\s*(=>)",
|
|
1662
1827
|
"applyEndPatternLast": 1,
|
|
1663
1828
|
"endCaptures": {
|
|
@@ -1695,7 +1860,7 @@
|
|
|
1695
1860
|
{
|
|
1696
1861
|
"comment": "e.g. play = (args) => { }",
|
|
1697
1862
|
"name": "meta.function.arrow.js",
|
|
1698
|
-
"begin": "\\s*+(\\b[_$a-zA-Z][$\\w]*)\\s*+(=)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\g<-1>)*\\))\\s*+(
|
|
1863
|
+
"begin": "\\s*+(\\b[_$a-zA-Z][$\\w]*)\\s*+(=)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\g<-1>)*\\))\\s*+(((?::(?:(\\s*+(&|\\|)?(\\s*+[$_a-zA-Z0-9]+(<(?:(?>[^<>]+)|\\g<-1>)*>)?|\\s*+({(?:(?>[^{}]+)|\\g<-1>)*\\})|\\s*+(\\[(?:(?>[^\\[\\]]+)|\\g<-1>)*\\])|\\s*+(\\s*([\"']).*?\\k<-1>(?<!\\\\.))|\\s*[x0-9A-Fa-f]+))|(?:\\s*+/\\*.*?\\*/))*+)*)|(?:/\\*.*?\\*/))(((?<=checks)|(\\s*\\bchecks))\\b\\s*(\\((?:(?>[^()]+)|\\g<-1>)*\\))?)?\\s*=>)",
|
|
1699
1864
|
"end": "\\s*(=>)",
|
|
1700
1865
|
"applyEndPatternLast": 1,
|
|
1701
1866
|
"beginCaptures": {
|
|
@@ -1745,7 +1910,7 @@
|
|
|
1745
1910
|
{
|
|
1746
1911
|
"comment": "Sound.prototype.play = (args) => { }",
|
|
1747
1912
|
"name": "meta.prototype.function.arrow.js",
|
|
1748
|
-
"begin": "\\s*+(\\b[A-Z][$\\w]*)?(\\.)(prototype)(\\.)([_$a-zA-Z][$\\w]*)\\s*+(=)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\g<-1>)*\\))\\s*+(
|
|
1913
|
+
"begin": "\\s*+(\\b[A-Z][$\\w]*)?(\\.)(prototype)(\\.)([_$a-zA-Z][$\\w]*)\\s*+(=)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\g<-1>)*\\))\\s*+(((?::(?:(\\s*+(&|\\|)?(\\s*+[$_a-zA-Z0-9]+(<(?:(?>[^<>]+)|\\g<-1>)*>)?|\\s*+({(?:(?>[^{}]+)|\\g<-1>)*\\})|\\s*+(\\[(?:(?>[^\\[\\]]+)|\\g<-1>)*\\])|\\s*+(\\s*([\"']).*?\\k<-1>(?<!\\\\.))|\\s*[x0-9A-Fa-f]+))|(?:\\s*+/\\*.*?\\*/))*+)*)|(?:/\\*.*?\\*/))(((?<=checks)|(\\s*\\bchecks))\\b\\s*(\\((?:(?>[^()]+)|\\g<-1>)*\\))?)?\\s*=>)",
|
|
1749
1914
|
"end": "\\s*(=>)",
|
|
1750
1915
|
"applyEndPatternLast": 1,
|
|
1751
1916
|
"beginCaptures": {
|
|
@@ -1819,7 +1984,7 @@
|
|
|
1819
1984
|
{
|
|
1820
1985
|
"comment": "e.g. Sound.play = (args) => { }",
|
|
1821
1986
|
"name": "meta.function.static.arrow.js",
|
|
1822
|
-
"begin": "\\s*+(\\b_?[A-Z][$\\w]*)?(\\.)([_$a-zA-Z][$\\w]*)\\s*+(=)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\g<-1>)*\\))\\s*+(
|
|
1987
|
+
"begin": "\\s*+(\\b_?[A-Z][$\\w]*)?(\\.)([_$a-zA-Z][$\\w]*)\\s*+(=)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\g<-1>)*\\))\\s*+(((?::(?:(\\s*+(&|\\|)?(\\s*+[$_a-zA-Z0-9]+(<(?:(?>[^<>]+)|\\g<-1>)*>)?|\\s*+({(?:(?>[^{}]+)|\\g<-1>)*\\})|\\s*+(\\[(?:(?>[^\\[\\]]+)|\\g<-1>)*\\])|\\s*+(\\s*([\"']).*?\\k<-1>(?<!\\\\.))|\\s*[x0-9A-Fa-f]+))|(?:\\s*+/\\*.*?\\*/))*+)*)|(?:/\\*.*?\\*/))(((?<=checks)|(\\s*\\bchecks))\\b\\s*(\\((?:(?>[^()]+)|\\g<-1>)*\\))?)?\\s*=>)",
|
|
1823
1988
|
"end": "\\s*(=>)",
|
|
1824
1989
|
"applyEndPatternLast": 1,
|
|
1825
1990
|
"beginCaptures": {
|
|
@@ -1886,7 +2051,7 @@
|
|
|
1886
2051
|
{
|
|
1887
2052
|
"comment": "e.g. play<T,T>(arg1, arg2): Type<T> { }",
|
|
1888
2053
|
"name": "meta.function.method.js",
|
|
1889
|
-
"begin": "(?:^|;)\\s*+(\\bstatic\\b)?\\s*+(\\basync\\b)?\\s*+(\\*?)\\s*+(?<!\\.)(?!\\b(break|case|catch|continue|do|else|finally|for|function|if|export|import|package|return|switch|throw|try|while|with)\\b)([_$a-zA-Z][$\\w]*)\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?(\\((?:(?>[^()]+)|\\g<-1>)*\\))\\s*+(?:\\s*:(\\s*+(&|\\|)?(\\s*+[$_a-zA-Z0-9]+(<(?:(?>[^<>]+)|\\g<-1>)*>)?|\\s*+(
|
|
2054
|
+
"begin": "(?:^|;)\\s*+(\\bstatic\\b)?\\s*+(\\basync\\b)?\\s*+(\\*?)\\s*+(?<!\\.)(?!\\b(break|case|catch|continue|do|else|finally|for|function|if|export|import|package|return|switch|throw|try|while|with)\\b)([_$a-zA-Z][$\\w]*)\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?(\\((?:(?>[^()]+)|\\g<-1>)*\\))\\s*+(?:\\s*:(\\s*+(&|\\|)?(\\s*+[$_a-zA-Z0-9]+(<(?:(?>[^<>]+)|\\g<-1>)*>)?|\\s*+({(?:(?>[^{}]+)|\\g<-1>)*\\})|\\s*+(\\[(?:(?>[^\\[\\]]+)|\\g<-1>)*\\])|\\s*+(\\s*([\"']).*?\\k<-1>(?<!\\\\.))|\\s*[x0-9A-Fa-f]+))*+)*\\s*{)",
|
|
1890
2055
|
"end": "\\s*(?=.)",
|
|
1891
2056
|
"applyEndPatternLast": 1,
|
|
1892
2057
|
"beginCaptures": {
|
|
@@ -1942,7 +2107,7 @@
|
|
|
1942
2107
|
{
|
|
1943
2108
|
"comment": "e.g. 'play'<T,T>(arg1, arg2): Type<T> { }",
|
|
1944
2109
|
"name": "meta.function.method.js",
|
|
1945
|
-
"begin": "(?<!:)\\s*+(\\bstatic\\b)?\\s*+(\\basync\\b)?\\s*+(\\*?)\\s*+(?<!\\.)(('
|
|
2110
|
+
"begin": "(?<!:)\\s*+(\\bstatic\\b)?\\s*+(\\basync\\b)?\\s*+(\\*?)\\s*+(?<!\\.)(('|\")([^\"']*)(\\k<-3>))\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?(\\())",
|
|
1946
2111
|
"end": "\\s*(?=.)",
|
|
1947
2112
|
"applyEndPatternLast": 1,
|
|
1948
2113
|
"beginCaptures": {
|
|
@@ -2140,26 +2305,219 @@
|
|
|
2140
2305
|
"literal-module": {
|
|
2141
2306
|
"patterns": [
|
|
2142
2307
|
{
|
|
2143
|
-
"
|
|
2144
|
-
"match": "\\s*+(?<!\\.)\\b(import|export|default)\\b"
|
|
2308
|
+
"include": "#literal-module-import"
|
|
2145
2309
|
},
|
|
2146
2310
|
{
|
|
2147
|
-
"
|
|
2148
|
-
"match": "\\s*+(?<!\\.)\\b(from|as)\\b"
|
|
2311
|
+
"include": "#literal-module-export"
|
|
2149
2312
|
}
|
|
2150
2313
|
]
|
|
2151
2314
|
},
|
|
2152
|
-
"literal-
|
|
2153
|
-
"
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
"
|
|
2315
|
+
"literal-module-import": {
|
|
2316
|
+
"begin": "\\s*+(?<!\\.)\\b(import)(?!\\s*:)\\b",
|
|
2317
|
+
"end": "\\s*(?:(?:(\\bfrom\\b)?+\\s++(('|\")([^\"']*)(\\k<-3>)))|(?=;|^\\s*\\b(if|switch|try|var|let|const|static|function|return|class|do|for|while|debugger|export|import|yield|type|declare|interface)\\b|\\)|}))",
|
|
2318
|
+
"beginCaptures": {
|
|
2319
|
+
"1": {
|
|
2320
|
+
"name": "keyword.control.module.js"
|
|
2321
|
+
}
|
|
2322
|
+
},
|
|
2323
|
+
"endCaptures": {
|
|
2324
|
+
"1": {
|
|
2325
|
+
"name": "keyword.control.module.js"
|
|
2158
2326
|
},
|
|
2159
|
-
{
|
|
2160
|
-
"
|
|
2161
|
-
|
|
2162
|
-
|
|
2327
|
+
"3": {
|
|
2328
|
+
"name": "punctuation.definition.string.begin.js"
|
|
2329
|
+
},
|
|
2330
|
+
"4": {
|
|
2331
|
+
"name": "string.quoted.module.js"
|
|
2332
|
+
},
|
|
2333
|
+
"5": {
|
|
2334
|
+
"name": "punctuation.definition.string.begin.js"
|
|
2335
|
+
}
|
|
2336
|
+
},
|
|
2337
|
+
"patterns": [
|
|
2338
|
+
{
|
|
2339
|
+
"match": "\\s*\\b(default)\\b",
|
|
2340
|
+
"captures": {
|
|
2341
|
+
"1": {
|
|
2342
|
+
"name": "keyword.control.module.js"
|
|
2343
|
+
}
|
|
2344
|
+
}
|
|
2345
|
+
},
|
|
2346
|
+
{
|
|
2347
|
+
"match": "\\s*\\b(typeof|type)\\b\\s++(?={|[$_a-zA-Z])(?!\\b(instanceof|in|as)\\b|,)",
|
|
2348
|
+
"captures": {
|
|
2349
|
+
"1": {
|
|
2350
|
+
"name": "keyword.other.typedef.flowtype"
|
|
2351
|
+
}
|
|
2352
|
+
}
|
|
2353
|
+
},
|
|
2354
|
+
{
|
|
2355
|
+
"name": "keyword.operator.module.all.js",
|
|
2356
|
+
"match": "\\*"
|
|
2357
|
+
},
|
|
2358
|
+
{
|
|
2359
|
+
"include": "#literal-module-as"
|
|
2360
|
+
},
|
|
2361
|
+
{
|
|
2362
|
+
"include": "#literal-module-brackets"
|
|
2363
|
+
},
|
|
2364
|
+
{
|
|
2365
|
+
"include": "#literal-variable"
|
|
2366
|
+
},
|
|
2367
|
+
{
|
|
2368
|
+
"include": "#comments"
|
|
2369
|
+
},
|
|
2370
|
+
{
|
|
2371
|
+
"include": "#literal-comma"
|
|
2372
|
+
}
|
|
2373
|
+
]
|
|
2374
|
+
},
|
|
2375
|
+
"literal-module-export": {
|
|
2376
|
+
"patterns": [
|
|
2377
|
+
{
|
|
2378
|
+
"comment": "e.g. export let variable =, export type a=",
|
|
2379
|
+
"match": "\\s*+(?<!\\.)\\b(export)(?!\\s*:)\\b(?=\\s++(let|type|typeof)\\s++[$_a-zA-Z])",
|
|
2380
|
+
"captures": {
|
|
2381
|
+
"1": {
|
|
2382
|
+
"name": "keyword.control.module.js"
|
|
2383
|
+
}
|
|
2384
|
+
}
|
|
2385
|
+
},
|
|
2386
|
+
{
|
|
2387
|
+
"comment": "export { or export * or export var from module",
|
|
2388
|
+
"begin": "\\s*+(?<!\\.)\\b(export)\\b(?=\\s++({|\\*|[$_a-zA-Z][$_\\w]*(\\s++from\\b|\\s*,)))",
|
|
2389
|
+
"end": "\\s*(?:(?:(\\bfrom\\b)?+\\s++(('|\")([^\"']*)(\\k<-3>)))|(?=;|^\\s*\\b(if|switch|try|var|let|const|static|function|return|class|do|for|while|debugger|export|import|yield|type|declare|interface)\\b|\\)|}))",
|
|
2390
|
+
"beginCaptures": {
|
|
2391
|
+
"1": {
|
|
2392
|
+
"name": "keyword.control.module.js"
|
|
2393
|
+
}
|
|
2394
|
+
},
|
|
2395
|
+
"endCaptures": {
|
|
2396
|
+
"1": {
|
|
2397
|
+
"name": "keyword.control.module.js"
|
|
2398
|
+
},
|
|
2399
|
+
"3": {
|
|
2400
|
+
"name": "punctuation.definition.string.begin.js"
|
|
2401
|
+
},
|
|
2402
|
+
"4": {
|
|
2403
|
+
"name": "string.quoted.module.js"
|
|
2404
|
+
},
|
|
2405
|
+
"5": {
|
|
2406
|
+
"name": "punctuation.definition.string.begin.js"
|
|
2407
|
+
}
|
|
2408
|
+
},
|
|
2409
|
+
"patterns": [
|
|
2410
|
+
{
|
|
2411
|
+
"name": "keyword.operator.module.all.js",
|
|
2412
|
+
"match": "\\*"
|
|
2413
|
+
},
|
|
2414
|
+
{
|
|
2415
|
+
"include": "#literal-module-as"
|
|
2416
|
+
},
|
|
2417
|
+
{
|
|
2418
|
+
"include": "#literal-module-brackets"
|
|
2419
|
+
},
|
|
2420
|
+
{
|
|
2421
|
+
"include": "#literal-variable"
|
|
2422
|
+
},
|
|
2423
|
+
{
|
|
2424
|
+
"include": "#comments"
|
|
2425
|
+
},
|
|
2426
|
+
{
|
|
2427
|
+
"include": "#literal-comma"
|
|
2428
|
+
}
|
|
2429
|
+
]
|
|
2430
|
+
},
|
|
2431
|
+
{
|
|
2432
|
+
"comment": "trap expressions among - export function* () {}",
|
|
2433
|
+
"match": "\\s*+(?<!\\.)\\b(export|default)(?!\\s*:)\\b",
|
|
2434
|
+
"captures": {
|
|
2435
|
+
"1": {
|
|
2436
|
+
"name": "keyword.control.module.js"
|
|
2437
|
+
}
|
|
2438
|
+
}
|
|
2439
|
+
}
|
|
2440
|
+
]
|
|
2441
|
+
},
|
|
2442
|
+
"literal-module-as": {
|
|
2443
|
+
"match": "\\s*+(?:(\\*)|([$_a-zA-Z][$_\\w]*))\\s++(\\bas\\b)\\s++(?:(\\bdefault\\b)|([$_a-zA-Z][$_\\w]*))",
|
|
2444
|
+
"captures": {
|
|
2445
|
+
"1": {
|
|
2446
|
+
"name": "keyword.operator.module.all.js"
|
|
2447
|
+
},
|
|
2448
|
+
"2": {
|
|
2449
|
+
"name": "variable.other.readwrite.js"
|
|
2450
|
+
},
|
|
2451
|
+
"3": {
|
|
2452
|
+
"name": "keyword.control.module.reference.js"
|
|
2453
|
+
},
|
|
2454
|
+
"4": {
|
|
2455
|
+
"name": "keyword.control.module.js"
|
|
2456
|
+
},
|
|
2457
|
+
"5": {
|
|
2458
|
+
"name": "variable.other.readwrite.js"
|
|
2459
|
+
}
|
|
2460
|
+
}
|
|
2461
|
+
},
|
|
2462
|
+
"literal-module-brackets": {
|
|
2463
|
+
"patterns": [
|
|
2464
|
+
{
|
|
2465
|
+
"begin": "\\s*+(?:({)|(\\[))",
|
|
2466
|
+
"end": "\\s*(?:(\\})|(\\]))",
|
|
2467
|
+
"beginCaptures": {
|
|
2468
|
+
"1": {
|
|
2469
|
+
"name": "meta.brace.curly.js"
|
|
2470
|
+
},
|
|
2471
|
+
"2": {
|
|
2472
|
+
"name": "meta.brace.square.js"
|
|
2473
|
+
}
|
|
2474
|
+
},
|
|
2475
|
+
"endCaptures": {
|
|
2476
|
+
"1": {
|
|
2477
|
+
"name": "meta.brace.curly.js"
|
|
2478
|
+
},
|
|
2479
|
+
"2": {
|
|
2480
|
+
"name": "meta.brace.square.js"
|
|
2481
|
+
}
|
|
2482
|
+
},
|
|
2483
|
+
"patterns": [
|
|
2484
|
+
{
|
|
2485
|
+
"name": "keyword.operator.module.all.js",
|
|
2486
|
+
"match": "\\*"
|
|
2487
|
+
},
|
|
2488
|
+
{
|
|
2489
|
+
"include": "#literal-module-as"
|
|
2490
|
+
},
|
|
2491
|
+
{
|
|
2492
|
+
"include": "#literal-module-brackets"
|
|
2493
|
+
},
|
|
2494
|
+
{
|
|
2495
|
+
"include": "#literal-variable"
|
|
2496
|
+
},
|
|
2497
|
+
{
|
|
2498
|
+
"include": "#literal-string"
|
|
2499
|
+
},
|
|
2500
|
+
{
|
|
2501
|
+
"include": "#comments"
|
|
2502
|
+
},
|
|
2503
|
+
{
|
|
2504
|
+
"include": "#literal-comma"
|
|
2505
|
+
}
|
|
2506
|
+
]
|
|
2507
|
+
}
|
|
2508
|
+
]
|
|
2509
|
+
},
|
|
2510
|
+
"literal-variable": {
|
|
2511
|
+
"patterns": [
|
|
2512
|
+
{
|
|
2513
|
+
"comment": "e.g. CONSTANT",
|
|
2514
|
+
"name": "variable.other.constant.js",
|
|
2515
|
+
"match": "\\s*+[A-Z][_$\\dA-Z]*\\b"
|
|
2516
|
+
},
|
|
2517
|
+
{
|
|
2518
|
+
"comment": "e.g. dollar vars",
|
|
2519
|
+
"name": "variable.other.dollar.js",
|
|
2520
|
+
"match": "\\s*+\\$[$\\w]*"
|
|
2163
2521
|
},
|
|
2164
2522
|
{
|
|
2165
2523
|
"comment": "e.g. Class.property",
|
|
@@ -2256,11 +2614,24 @@
|
|
|
2256
2614
|
}
|
|
2257
2615
|
]
|
|
2258
2616
|
},
|
|
2617
|
+
"es7-function-bind": {
|
|
2618
|
+
"patterns": [
|
|
2619
|
+
{
|
|
2620
|
+
"comment": "https://github.com/zenparsing/es-function-bind#examples",
|
|
2621
|
+
"match": "\\s*(::)",
|
|
2622
|
+
"captures": {
|
|
2623
|
+
"1": {
|
|
2624
|
+
"name": "keyword.operator.accessor.js"
|
|
2625
|
+
}
|
|
2626
|
+
}
|
|
2627
|
+
}
|
|
2628
|
+
]
|
|
2629
|
+
},
|
|
2259
2630
|
"jsx": {
|
|
2260
2631
|
"comment": "Avoid < operator expressions as best we can using Zertosh's regex",
|
|
2261
2632
|
"patterns": [
|
|
2262
2633
|
{
|
|
2263
|
-
"begin": "(?<=\\(
|
|
2634
|
+
"begin": "(?<=\\(|{|\\[|,|&&|\\|\\||\\?|:|=|=>|\\Wreturn|^return|\\Wdefault|^)\\s*+(?=<[$_\\p{L}])",
|
|
2264
2635
|
"end": "(?=.)",
|
|
2265
2636
|
"applyEndPatternLast": 1,
|
|
2266
2637
|
"patterns": [
|
|
@@ -2276,6 +2647,7 @@
|
|
|
2276
2647
|
{
|
|
2277
2648
|
"comment": "Tags that end > are trapped in #jsx-tag-termination",
|
|
2278
2649
|
"name": "meta.tag.jsx",
|
|
2650
|
+
"contentName": "JSXAttrs",
|
|
2279
2651
|
"begin": "\\s*+(<)((\\p{Ll}[\\p{Ll}0-9]*)|((?:[$_\\p{L}\\p{Nl}][$_\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}-]*?:)?+(?:[$_\\p{L}\\p{Nl}](?:[$_\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}\\.-](?<!\\.\\.))*+)+))(?=[ />\\s])(?![:])(?<!\\.|:)",
|
|
2280
2652
|
"end": "\\s*(?<=</)((\\4)|\\2)(>)|(/>)|((?<=</)[\\S ]*?)>",
|
|
2281
2653
|
"beginCaptures": {
|
|
@@ -2321,6 +2693,7 @@
|
|
|
2321
2693
|
"patterns": [
|
|
2322
2694
|
{
|
|
2323
2695
|
"comment": "uses non consuming search for </ in </tag>",
|
|
2696
|
+
"contentName": "JSXNested",
|
|
2324
2697
|
"begin": "(>)",
|
|
2325
2698
|
"end": "(</)",
|
|
2326
2699
|
"beginCaptures": {
|
|
@@ -2450,32 +2823,52 @@
|
|
|
2450
2823
|
]
|
|
2451
2824
|
},
|
|
2452
2825
|
"jsx-evaluated-code": {
|
|
2453
|
-
"name": "meta.embedded.expression.js",
|
|
2454
|
-
"begin": "{",
|
|
2455
|
-
"end": "}",
|
|
2456
|
-
"beginCaptures": {
|
|
2457
|
-
"0": {
|
|
2458
|
-
"name": "punctuation.section.embedded.begin.jsx"
|
|
2459
|
-
}
|
|
2460
|
-
},
|
|
2461
|
-
"endCaptures": {
|
|
2462
|
-
"0": {
|
|
2463
|
-
"name": "punctuation.section.embedded.end.jsx"
|
|
2464
|
-
}
|
|
2465
|
-
},
|
|
2466
|
-
"contentName": "source.js.jsx",
|
|
2467
2826
|
"patterns": [
|
|
2468
2827
|
{
|
|
2469
|
-
"
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
"
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2828
|
+
"name": "meta.embedded.expression.commented-out.jsx",
|
|
2829
|
+
"contentName": "comment.embedded.jsx",
|
|
2830
|
+
"begin": "^\\s*({/\\*)",
|
|
2831
|
+
"end": "\\s*(\\*/})",
|
|
2832
|
+
"beginCaptures": {
|
|
2833
|
+
"1": {
|
|
2834
|
+
"name": "punctuation.section.embedded.begin.jsx"
|
|
2835
|
+
}
|
|
2836
|
+
},
|
|
2837
|
+
"endCaptures": {
|
|
2838
|
+
"1": {
|
|
2839
|
+
"name": "punctuation.section.embedded.end.jsx"
|
|
2840
|
+
}
|
|
2841
|
+
}
|
|
2476
2842
|
},
|
|
2477
2843
|
{
|
|
2478
|
-
"
|
|
2844
|
+
"name": "meta.embedded.expression.js",
|
|
2845
|
+
"contentName": "source.js.jsx",
|
|
2846
|
+
"begin": "{",
|
|
2847
|
+
"end": "}",
|
|
2848
|
+
"beginCaptures": {
|
|
2849
|
+
"0": {
|
|
2850
|
+
"name": "punctuation.section.embedded.begin.jsx"
|
|
2851
|
+
}
|
|
2852
|
+
},
|
|
2853
|
+
"endCaptures": {
|
|
2854
|
+
"0": {
|
|
2855
|
+
"name": "punctuation.section.embedded.end.jsx"
|
|
2856
|
+
}
|
|
2857
|
+
},
|
|
2858
|
+
"patterns": [
|
|
2859
|
+
{
|
|
2860
|
+
"include": "#jsx-string-double-quoted"
|
|
2861
|
+
},
|
|
2862
|
+
{
|
|
2863
|
+
"include": "#jsx-string-single-quoted"
|
|
2864
|
+
},
|
|
2865
|
+
{
|
|
2866
|
+
"include": "#jsx-spread-attribute"
|
|
2867
|
+
},
|
|
2868
|
+
{
|
|
2869
|
+
"include": "#expression"
|
|
2870
|
+
}
|
|
2871
|
+
]
|
|
2479
2872
|
}
|
|
2480
2873
|
]
|
|
2481
2874
|
},
|
|
@@ -2535,10 +2928,32 @@
|
|
|
2535
2928
|
}
|
|
2536
2929
|
},
|
|
2537
2930
|
"patterns": [
|
|
2931
|
+
{
|
|
2932
|
+
"include": "#flowtype-predicate"
|
|
2933
|
+
},
|
|
2538
2934
|
{
|
|
2539
2935
|
"include": "#flowtype-parse-types"
|
|
2540
2936
|
}
|
|
2541
2937
|
]
|
|
2938
|
+
},
|
|
2939
|
+
{
|
|
2940
|
+
"include": "#flowtype-predicate"
|
|
2941
|
+
}
|
|
2942
|
+
]
|
|
2943
|
+
},
|
|
2944
|
+
"flowtype-predicate": {
|
|
2945
|
+
"comment": "flow predicate checks",
|
|
2946
|
+
"begin": "\\s*\\b(checks)\\b(?=(\\s*(\\((?:(?>[^()]+)|\\g<-1>)*\\))?)?\\s*(=>|{|;|$))",
|
|
2947
|
+
"end": "(?=.)",
|
|
2948
|
+
"applyEndPatternLast": 1,
|
|
2949
|
+
"beginCaptures": {
|
|
2950
|
+
"1": {
|
|
2951
|
+
"name": "entity.name.function.predicate.flowtype"
|
|
2952
|
+
}
|
|
2953
|
+
},
|
|
2954
|
+
"patterns": [
|
|
2955
|
+
{
|
|
2956
|
+
"include": "#round-brackets"
|
|
2542
2957
|
}
|
|
2543
2958
|
]
|
|
2544
2959
|
},
|
|
@@ -2546,7 +2961,7 @@
|
|
|
2546
2961
|
"patterns": [
|
|
2547
2962
|
{
|
|
2548
2963
|
"comment": "e.g. let a: ()=>null = function() {return null}",
|
|
2549
|
-
"match": "(?<!\\.)\\s*+([$_\\p{L}](?:[$.\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}])*+)\\s*+(\\??)\\s*+(?=:\\s*(\\bFunction\\b|(\\((?:(?>[^()]+)|\\g<-1>)*\\))\\s*=>|\\(\\s*$))",
|
|
2964
|
+
"match": "(?<!\\.)\\s*+([$_\\p{L}](?:[$.\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}])*+)\\s*+(\\??)\\s*+(?=:\\s*([$_\\p{L}](?:[$.\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}])*+)?\\s*(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*(\\bFunction\\b|(\\((?:(?>[^()]+)|\\g<-1>)*\\))\\s*=>|\\(\\s*$))",
|
|
2550
2965
|
"captures": {
|
|
2551
2966
|
"1": {
|
|
2552
2967
|
"name": "storage.type.function.js"
|
|
@@ -2580,18 +2995,30 @@
|
|
|
2580
2995
|
"patterns": [
|
|
2581
2996
|
{
|
|
2582
2997
|
"comment": "flowtype optional arg/parameter e.g. protocol? : string",
|
|
2583
|
-
"
|
|
2584
|
-
"
|
|
2998
|
+
"match": "\\s*+(\\?)",
|
|
2999
|
+
"captures": {
|
|
3000
|
+
"1": {
|
|
3001
|
+
"name": "punctuation.type.flowtype"
|
|
3002
|
+
}
|
|
3003
|
+
}
|
|
2585
3004
|
},
|
|
2586
3005
|
{
|
|
2587
3006
|
"comment": "Type Unions |",
|
|
2588
|
-
"
|
|
2589
|
-
"
|
|
3007
|
+
"match": "\\s*+(\\|)",
|
|
3008
|
+
"captures": {
|
|
3009
|
+
"1": {
|
|
3010
|
+
"name": "kewyword.operator.union.flowtype"
|
|
3011
|
+
}
|
|
3012
|
+
}
|
|
2590
3013
|
},
|
|
2591
3014
|
{
|
|
2592
3015
|
"comment": "intersection of types &",
|
|
2593
|
-
"
|
|
2594
|
-
"
|
|
3016
|
+
"match": "\\s*+(\\&)",
|
|
3017
|
+
"captures": {
|
|
3018
|
+
"1": {
|
|
3019
|
+
"name": "kewyword.operator.intersection.flowtype"
|
|
3020
|
+
}
|
|
3021
|
+
}
|
|
2595
3022
|
},
|
|
2596
3023
|
{
|
|
2597
3024
|
"comment": "typed entity :",
|
|
@@ -2614,7 +3041,7 @@
|
|
|
2614
3041
|
},
|
|
2615
3042
|
{
|
|
2616
3043
|
"comment": "An Iterator prefix?",
|
|
2617
|
-
"match": "\\s
|
|
3044
|
+
"match": "\\s*+(@@)"
|
|
2618
3045
|
},
|
|
2619
3046
|
{
|
|
2620
3047
|
"begin": "\\s*+(=>)",
|
|
@@ -2656,12 +3083,20 @@
|
|
|
2656
3083
|
"patterns": [
|
|
2657
3084
|
{
|
|
2658
3085
|
"comment": "Maybe types",
|
|
2659
|
-
"
|
|
2660
|
-
"
|
|
3086
|
+
"match": "\\s*+(\\?)",
|
|
3087
|
+
"captures": {
|
|
3088
|
+
"1": {
|
|
3089
|
+
"name": "keyword.operator.maybe.flowtype"
|
|
3090
|
+
}
|
|
3091
|
+
}
|
|
2661
3092
|
},
|
|
2662
3093
|
{
|
|
2663
|
-
"
|
|
2664
|
-
"
|
|
3094
|
+
"match": "\\s*+\\b(typeof)\\b\\s*+",
|
|
3095
|
+
"captures": {
|
|
3096
|
+
"1": {
|
|
3097
|
+
"name": "keyword.operator.flowtype"
|
|
3098
|
+
}
|
|
3099
|
+
}
|
|
2665
3100
|
},
|
|
2666
3101
|
{
|
|
2667
3102
|
"comment": "primitive flowtypes",
|
|
@@ -2704,23 +3139,40 @@
|
|
|
2704
3139
|
},
|
|
2705
3140
|
{
|
|
2706
3141
|
"comment": "Type Unions |",
|
|
2707
|
-
"
|
|
2708
|
-
"
|
|
3142
|
+
"match": "\\s*+(\\|)",
|
|
3143
|
+
"captures": {
|
|
3144
|
+
"1": {
|
|
3145
|
+
"name": "kewyword.operator.union.flowtype"
|
|
3146
|
+
}
|
|
3147
|
+
}
|
|
2709
3148
|
},
|
|
2710
3149
|
{
|
|
2711
3150
|
"comment": "intersection of types &",
|
|
2712
|
-
"
|
|
2713
|
-
"
|
|
3151
|
+
"match": "\\s*+(\\&)",
|
|
3152
|
+
"captures": {
|
|
3153
|
+
"1": {
|
|
3154
|
+
"name": "kewyword.operator.intersection.flowtype"
|
|
3155
|
+
}
|
|
3156
|
+
}
|
|
2714
3157
|
},
|
|
2715
3158
|
{
|
|
2716
3159
|
"comment": "as per React declares in flowtype github",
|
|
2717
|
-
"
|
|
2718
|
-
"
|
|
3160
|
+
"match": "\\s*+(\\*)",
|
|
3161
|
+
"captures": {
|
|
3162
|
+
"1": {
|
|
3163
|
+
"name": "kewyword.operator.existential.flowtype"
|
|
3164
|
+
}
|
|
3165
|
+
}
|
|
2719
3166
|
},
|
|
2720
3167
|
{
|
|
2721
3168
|
"comment": "types of type marker e.g. <T: number | string>",
|
|
2722
3169
|
"name": "punctuation.type.flowtype",
|
|
2723
|
-
"match": "\\s*+(:)"
|
|
3170
|
+
"match": "\\s*+(:)",
|
|
3171
|
+
"captures": {
|
|
3172
|
+
"1": {
|
|
3173
|
+
"name": "support.type.builtin.primitive.flowtype"
|
|
3174
|
+
}
|
|
3175
|
+
}
|
|
2724
3176
|
},
|
|
2725
3177
|
{
|
|
2726
3178
|
"comment": "call back with a form ) => type",
|
|
@@ -2768,6 +3220,9 @@
|
|
|
2768
3220
|
}
|
|
2769
3221
|
},
|
|
2770
3222
|
"patterns": [
|
|
3223
|
+
{
|
|
3224
|
+
"include": "#flowtype-polymorphs"
|
|
3225
|
+
},
|
|
2771
3226
|
{
|
|
2772
3227
|
"include": "#flowtype-variable"
|
|
2773
3228
|
}
|
|
@@ -2847,7 +3302,7 @@
|
|
|
2847
3302
|
},
|
|
2848
3303
|
"flowtype-parse-objects": {
|
|
2849
3304
|
"comment": "object literal flowtype preceded by either => : | & ? symbols",
|
|
2850
|
-
"begin": "(?<=:|\\||&|\\?|=>|<)\\s*+(
|
|
3305
|
+
"begin": "(?<=:|\\||&|\\?|=>|<)\\s*+({)",
|
|
2851
3306
|
"end": "\\s*(\\})",
|
|
2852
3307
|
"applyEndPatternLast": 1,
|
|
2853
3308
|
"beginCaptures": {
|
|
@@ -2869,19 +3324,13 @@
|
|
|
2869
3324
|
"flowtype-object-property": {
|
|
2870
3325
|
"patterns": [
|
|
2871
3326
|
{
|
|
2872
|
-
"
|
|
2873
|
-
"match": "\\s*+(((\"|').*?(?<=[^\\\\])\\k<-1>)|([$_\\p{L}](?:[$.\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}])*+))\\s*+(\\??)\\s*+(?=:)",
|
|
2874
|
-
"captures": {
|
|
2875
|
-
"1": {
|
|
2876
|
-
"name": "variable.other.property.flowtype"
|
|
2877
|
-
},
|
|
2878
|
-
"5": {
|
|
2879
|
-
"name": "keyword.operator.optional.parameter.flowtype"
|
|
2880
|
-
}
|
|
2881
|
-
}
|
|
3327
|
+
"include": "#literal-method"
|
|
2882
3328
|
},
|
|
2883
3329
|
{
|
|
2884
|
-
"include": "#
|
|
3330
|
+
"include": "#comments"
|
|
3331
|
+
},
|
|
3332
|
+
{
|
|
3333
|
+
"include": "#flowtype-variable"
|
|
2885
3334
|
}
|
|
2886
3335
|
]
|
|
2887
3336
|
},
|
|
@@ -2909,13 +3358,10 @@
|
|
|
2909
3358
|
"patterns": [
|
|
2910
3359
|
{
|
|
2911
3360
|
"comment": "type aliases for export but avoid type instaceof or type in operators",
|
|
2912
|
-
"begin": "
|
|
2913
|
-
"end": "\\s*(
|
|
3361
|
+
"begin": "(?:^|\\s)\\s*+(type)\\b\\s+(?!(instanceof|in)\\b)(?=[$_A-Za-z{\\[])",
|
|
3362
|
+
"end": "\\s*(;)|\\b(?=if|switch|try|var|let|const|static|function|return|class|do|for|while|debugger|export|import|yield|type|declare|interface)\\b",
|
|
2914
3363
|
"beginCaptures": {
|
|
2915
3364
|
"1": {
|
|
2916
|
-
"name": "keyword.control.module.js"
|
|
2917
|
-
},
|
|
2918
|
-
"2": {
|
|
2919
3365
|
"name": "keyword.other.typedef.flowtype"
|
|
2920
3366
|
}
|
|
2921
3367
|
},
|
|
@@ -2929,31 +3375,17 @@
|
|
|
2929
3375
|
"match": "\\s*+="
|
|
2930
3376
|
},
|
|
2931
3377
|
{
|
|
2932
|
-
"begin": "\\s*+{",
|
|
2933
|
-
"end": "\\s*}",
|
|
3378
|
+
"begin": "\\s*+({)",
|
|
3379
|
+
"end": "\\s*(})",
|
|
2934
3380
|
"applyEndPatternLast": 1,
|
|
2935
|
-
"
|
|
2936
|
-
"
|
|
2937
|
-
"name": "meta.brace.curly.js"
|
|
2938
|
-
}
|
|
2939
|
-
},
|
|
2940
|
-
"endCaptures": {
|
|
2941
|
-
"0": {
|
|
3381
|
+
"captures": {
|
|
3382
|
+
"1": {
|
|
2942
3383
|
"name": "meta.brace.curly.js"
|
|
2943
3384
|
}
|
|
2944
3385
|
},
|
|
2945
3386
|
"patterns": [
|
|
2946
3387
|
{
|
|
2947
|
-
"include": "#flowtype"
|
|
2948
|
-
},
|
|
2949
|
-
{
|
|
2950
|
-
"include": "#flowtype-variable"
|
|
2951
|
-
},
|
|
2952
|
-
{
|
|
2953
|
-
"include": "#comments"
|
|
2954
|
-
},
|
|
2955
|
-
{
|
|
2956
|
-
"include": "#flowtype-function-name"
|
|
3388
|
+
"include": "#flowtype-object-property"
|
|
2957
3389
|
}
|
|
2958
3390
|
]
|
|
2959
3391
|
},
|
|
@@ -2991,11 +3423,11 @@
|
|
|
2991
3423
|
"include": "#flowtype-polymorphs"
|
|
2992
3424
|
},
|
|
2993
3425
|
{
|
|
2994
|
-
"begin": "\\s*+{",
|
|
3426
|
+
"begin": "\\s*+({)",
|
|
2995
3427
|
"end": "\\s*(})",
|
|
2996
3428
|
"contentName": "meta.class.body.js",
|
|
2997
3429
|
"beginCaptures": {
|
|
2998
|
-
"
|
|
3430
|
+
"1": {
|
|
2999
3431
|
"name": "punctuation.section.class.begin.js"
|
|
3000
3432
|
}
|
|
3001
3433
|
},
|
|
@@ -3018,7 +3450,7 @@
|
|
|
3018
3450
|
"flowtype-declare": {
|
|
3019
3451
|
"patterns": [
|
|
3020
3452
|
{
|
|
3021
|
-
"match": "\\s*+(?<!\\.)\\b(declare)
|
|
3453
|
+
"match": "\\s*+(?<!\\.)\\b(declare)(?=\\s+(function|var|type|interface)\\b)",
|
|
3022
3454
|
"captures": {
|
|
3023
3455
|
"1": {
|
|
3024
3456
|
"name": "keyword.other.declare.flowtype"
|
|
@@ -3048,6 +3480,9 @@
|
|
|
3048
3480
|
}
|
|
3049
3481
|
},
|
|
3050
3482
|
"patterns": [
|
|
3483
|
+
{
|
|
3484
|
+
"include": "#flowtype-parse-objects"
|
|
3485
|
+
},
|
|
3051
3486
|
{
|
|
3052
3487
|
"include": "#flowtype-parse-types"
|
|
3053
3488
|
}
|
|
@@ -3072,7 +3507,11 @@
|
|
|
3072
3507
|
{
|
|
3073
3508
|
"comment": "look for module names but dont assume uppercase start char",
|
|
3074
3509
|
"match": "(?<!\\.)\\s*+([$_\\p{L}](?:[$\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}])*+)",
|
|
3075
|
-
"
|
|
3510
|
+
"captures": {
|
|
3511
|
+
"1": {
|
|
3512
|
+
"name": "entity.name.class.js"
|
|
3513
|
+
}
|
|
3514
|
+
}
|
|
3076
3515
|
},
|
|
3077
3516
|
{
|
|
3078
3517
|
"comment": "look for module names in quoted string forms",
|
|
@@ -3150,14 +3589,18 @@
|
|
|
3150
3589
|
"name": "entity.name.class.js"
|
|
3151
3590
|
},
|
|
3152
3591
|
{
|
|
3153
|
-
"include": "#literal-
|
|
3592
|
+
"include": "#literal-comma"
|
|
3154
3593
|
}
|
|
3155
3594
|
]
|
|
3156
3595
|
},
|
|
3157
3596
|
{
|
|
3158
3597
|
"comment": "look for class names but dont assume uppercase start char",
|
|
3159
3598
|
"match": "(?<!\\.)\\s*+([$_\\p{L}](?:[$\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}])*+)",
|
|
3160
|
-
"
|
|
3599
|
+
"captures": {
|
|
3600
|
+
"1": {
|
|
3601
|
+
"name": "entity.name.class.js"
|
|
3602
|
+
}
|
|
3603
|
+
}
|
|
3161
3604
|
},
|
|
3162
3605
|
{
|
|
3163
3606
|
"begin": "\\s*+({)",
|
|
@@ -3224,7 +3667,7 @@
|
|
|
3224
3667
|
"flowtype-typecast": {
|
|
3225
3668
|
"patterns": [
|
|
3226
3669
|
{
|
|
3227
|
-
"begin": "\\s
|
|
3670
|
+
"begin": "\\s*+(:)",
|
|
3228
3671
|
"end": "(?=\\s*+\\))",
|
|
3229
3672
|
"patterns": [
|
|
3230
3673
|
{
|
|
@@ -3234,6 +3677,106 @@
|
|
|
3234
3677
|
}
|
|
3235
3678
|
]
|
|
3236
3679
|
},
|
|
3680
|
+
"flowtype-comments": {
|
|
3681
|
+
"patterns": [
|
|
3682
|
+
{
|
|
3683
|
+
"begin": "\\s*+(/\\*)\\s*(::)",
|
|
3684
|
+
"end": "\\s*(\\*/)",
|
|
3685
|
+
"beginCaptures": {
|
|
3686
|
+
"1": {
|
|
3687
|
+
"name": "punctuation.definition.comment.js"
|
|
3688
|
+
},
|
|
3689
|
+
"2": {
|
|
3690
|
+
"name": "punctuation.type.flowtype"
|
|
3691
|
+
}
|
|
3692
|
+
},
|
|
3693
|
+
"endCaptures": {
|
|
3694
|
+
"1": {
|
|
3695
|
+
"name": "punctuation.definition.comment.js"
|
|
3696
|
+
}
|
|
3697
|
+
},
|
|
3698
|
+
"patterns": [
|
|
3699
|
+
{
|
|
3700
|
+
"include": "#flowtype-comments-optional-parameter"
|
|
3701
|
+
},
|
|
3702
|
+
{
|
|
3703
|
+
"include": "#literal-module"
|
|
3704
|
+
},
|
|
3705
|
+
{
|
|
3706
|
+
"include": "#flowtype-keywords"
|
|
3707
|
+
},
|
|
3708
|
+
{
|
|
3709
|
+
"include": "#flowtype-parse-types"
|
|
3710
|
+
}
|
|
3711
|
+
]
|
|
3712
|
+
},
|
|
3713
|
+
{
|
|
3714
|
+
"begin": "\\s*+(/\\*)\\s*(flow-include)\\b",
|
|
3715
|
+
"end": "\\s*(\\*/)",
|
|
3716
|
+
"beginCaptures": {
|
|
3717
|
+
"1": {
|
|
3718
|
+
"name": "punctuation.definition.comment.js"
|
|
3719
|
+
},
|
|
3720
|
+
"2": {
|
|
3721
|
+
"name": "punctuation.definition.variable.flowtype"
|
|
3722
|
+
}
|
|
3723
|
+
},
|
|
3724
|
+
"endCaptures": {
|
|
3725
|
+
"1": {
|
|
3726
|
+
"name": "punctuation.definition.comment.js"
|
|
3727
|
+
}
|
|
3728
|
+
},
|
|
3729
|
+
"patterns": [
|
|
3730
|
+
{
|
|
3731
|
+
"include": "#flowtype-comments-optional-parameter"
|
|
3732
|
+
},
|
|
3733
|
+
{
|
|
3734
|
+
"include": "#literal-module"
|
|
3735
|
+
},
|
|
3736
|
+
{
|
|
3737
|
+
"include": "#flowtype-keywords"
|
|
3738
|
+
},
|
|
3739
|
+
{
|
|
3740
|
+
"include": "#flowtype-parse-types"
|
|
3741
|
+
}
|
|
3742
|
+
]
|
|
3743
|
+
},
|
|
3744
|
+
{
|
|
3745
|
+
"begin": "\\s*+(/\\*)\\s*(:)",
|
|
3746
|
+
"end": "\\s*(\\*/)",
|
|
3747
|
+
"beginCaptures": {
|
|
3748
|
+
"1": {
|
|
3749
|
+
"name": "punctuation.definition.comment.js"
|
|
3750
|
+
},
|
|
3751
|
+
"2": {
|
|
3752
|
+
"name": "punctuation.type.flowtype"
|
|
3753
|
+
}
|
|
3754
|
+
},
|
|
3755
|
+
"endCaptures": {
|
|
3756
|
+
"1": {
|
|
3757
|
+
"name": "punctuation.definition.comment.js"
|
|
3758
|
+
}
|
|
3759
|
+
},
|
|
3760
|
+
"patterns": [
|
|
3761
|
+
{
|
|
3762
|
+
"include": "#flowtype-parse-types"
|
|
3763
|
+
}
|
|
3764
|
+
]
|
|
3765
|
+
}
|
|
3766
|
+
]
|
|
3767
|
+
},
|
|
3768
|
+
"flowtype-comments-optional-parameter": {
|
|
3769
|
+
"patterns": [
|
|
3770
|
+
{
|
|
3771
|
+
"match": "(?<=::|flow-include)\\s*(\\?)",
|
|
3772
|
+
"captures": {
|
|
3773
|
+
"1": {
|
|
3774
|
+
"name": "keyword.operator.optional.parameter.flowtype"
|
|
3775
|
+
}
|
|
3776
|
+
}
|
|
3777
|
+
}
|
|
3778
|
+
]
|
|
3779
|
+
},
|
|
3237
3780
|
"miscellaneous": {
|
|
3238
3781
|
"comment": "trap miscellaneous stuff",
|
|
3239
3782
|
"patterns": [
|
|
@@ -3247,6 +3790,55 @@
|
|
|
3247
3790
|
}
|
|
3248
3791
|
}
|
|
3249
3792
|
]
|
|
3793
|
+
},
|
|
3794
|
+
"html-template": {
|
|
3795
|
+
"comment": "Assume object properties of template: `some html` contain html",
|
|
3796
|
+
"begin": "(?:(?:^|(?<=,|{))\\s*\\b((template))\\b\\s*(:)\\s*(`))",
|
|
3797
|
+
"end": "\\s*(`)",
|
|
3798
|
+
"beginCaptures": {
|
|
3799
|
+
"1": {
|
|
3800
|
+
"name": "constant.other.object.key.js"
|
|
3801
|
+
},
|
|
3802
|
+
"2": {
|
|
3803
|
+
"name": "string.unquoted.js"
|
|
3804
|
+
},
|
|
3805
|
+
"3": {
|
|
3806
|
+
"name": "punctuation.separator.key-value.js"
|
|
3807
|
+
},
|
|
3808
|
+
"4": {
|
|
3809
|
+
"name": "punctuation.definition.quasi.begin.js"
|
|
3810
|
+
}
|
|
3811
|
+
},
|
|
3812
|
+
"endCaptures": {
|
|
3813
|
+
"1": {
|
|
3814
|
+
"name": "punctuation.definition.quasi.end.js"
|
|
3815
|
+
}
|
|
3816
|
+
},
|
|
3817
|
+
"patterns": [
|
|
3818
|
+
{
|
|
3819
|
+
"name": "entity.quasi.element.js",
|
|
3820
|
+
"begin": "(?<!\\\\)\\${",
|
|
3821
|
+
"end": "\\s*}",
|
|
3822
|
+
"beginCaptures": {
|
|
3823
|
+
"0": {
|
|
3824
|
+
"name": "punctuation.quasi.element.begin.js"
|
|
3825
|
+
}
|
|
3826
|
+
},
|
|
3827
|
+
"endCaptures": {
|
|
3828
|
+
"0": {
|
|
3829
|
+
"name": "punctuation.quasi.element.end.js"
|
|
3830
|
+
}
|
|
3831
|
+
},
|
|
3832
|
+
"patterns": [
|
|
3833
|
+
{
|
|
3834
|
+
"include": "#expression"
|
|
3835
|
+
}
|
|
3836
|
+
]
|
|
3837
|
+
},
|
|
3838
|
+
{
|
|
3839
|
+
"include": "text.html.mustache"
|
|
3840
|
+
}
|
|
3841
|
+
]
|
|
3250
3842
|
}
|
|
3251
3843
|
}
|
|
3252
3844
|
}
|