github-linguist 4.8.2 → 4.8.3
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/source.apl.json +1379 -407
- data/grammars/source.cs.json +4 -4
- data/grammars/source.css.less.json +2 -2
- data/grammars/source.d.json +1 -1
- data/grammars/source.dm.json +603 -0
- data/grammars/source.dmf.json +99 -0
- data/grammars/source.graphql.json +219 -0
- data/grammars/source.idris.json +537 -0
- data/grammars/source.js.json +44 -2
- data/grammars/source.js.jsx.json +204 -199
- data/grammars/source.pawn.json +4 -4
- data/grammars/source.perl6fe.json +43 -10
- data/grammars/source.purescript.json +57 -9
- data/grammars/source.regexp.babel.json +62 -49
- data/grammars/source.ruby.json +38 -0
- data/grammars/source.sqf.json +4 -3
- data/grammars/text.html.vue.json +110 -1
- data/grammars/text.slim.json +1 -1
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +12 -2
- data/lib/linguist/samples.json +141 -15
- data/lib/linguist/version.rb +1 -1
- metadata +6 -2
data/grammars/source.js.json
CHANGED
@@ -8,8 +8,10 @@
|
|
8
8
|
"gs",
|
9
9
|
"htc",
|
10
10
|
"jscad",
|
11
|
+
"jslib",
|
11
12
|
"jsm",
|
12
13
|
"json5",
|
14
|
+
"jspre",
|
13
15
|
"pac",
|
14
16
|
"pjs",
|
15
17
|
"xsjs",
|
@@ -714,6 +716,46 @@
|
|
714
716
|
}
|
715
717
|
]
|
716
718
|
},
|
719
|
+
{
|
720
|
+
"begin": "\\bMath\\b",
|
721
|
+
"beginCaptures": {
|
722
|
+
"0": {
|
723
|
+
"name": "support.class.js"
|
724
|
+
}
|
725
|
+
},
|
726
|
+
"end": "(?!\\G)",
|
727
|
+
"patterns": [
|
728
|
+
{
|
729
|
+
"begin": "\\s*(\\.)\\s*(abs|acos|acosh|asin|asinh|atan|atan2|atanh|cbrt|ceil|clz32|cos|cosh|exp|expm1|floor|fround|hypot|imul|log|log10|log1p|log2|max|min|pow|random|round|sign|sin|sinh|sqrt|tan|tanh|trunc)\\s*(?=\\()",
|
730
|
+
"beginCaptures": {
|
731
|
+
"1": {
|
732
|
+
"name": "meta.delimiter.method.period.js"
|
733
|
+
},
|
734
|
+
"2": {
|
735
|
+
"name": "support.function.math.js"
|
736
|
+
}
|
737
|
+
},
|
738
|
+
"end": "(?<=\\))",
|
739
|
+
"name": "meta.method-call.js",
|
740
|
+
"patterns": [
|
741
|
+
{
|
742
|
+
"include": "#arguments"
|
743
|
+
}
|
744
|
+
]
|
745
|
+
},
|
746
|
+
{
|
747
|
+
"match": "\\s*(\\.)\\s*(E|LN10|LN2|LOG10E|LOG2E|PI|SQRT1_2|SQRT2)\\b",
|
748
|
+
"captures": {
|
749
|
+
"1": {
|
750
|
+
"name": "meta.delimiter.property.period.js"
|
751
|
+
},
|
752
|
+
"2": {
|
753
|
+
"name": "support.constant.property.math.js"
|
754
|
+
}
|
755
|
+
}
|
756
|
+
}
|
757
|
+
]
|
758
|
+
},
|
717
759
|
{
|
718
760
|
"include": "#strings"
|
719
761
|
},
|
@@ -891,7 +933,7 @@
|
|
891
933
|
"name": "support.class.js"
|
892
934
|
},
|
893
935
|
{
|
894
|
-
"match": "(\\.)(systemLanguage|scripts|scrollbars|screenX|screenY|screenTop|screenLeft|style|styleSheets|status|statusText|statusbar|siblingBelow|siblingAbove|source|suffixes|security|securityPolicy|selection|self|history|host|hostname|hash|hasFocus|XMLDocument|XSLDocument|next|namespaces|namespaceURI|nameProp|MIN_VALUE|MAX_VALUE|characterSet|constructor|controllers|cookieEnabled|colorDepth|components|complete|current|cpuClass|clip|clipBoardData|clientInformation|closed|classes|callee|caller|crypto|toolbar|top|textTransform|textIndent|textDecoration|textAlign|tags|
|
936
|
+
"match": "(\\.)(systemLanguage|scripts|scrollbars|screenX|screenY|screenTop|screenLeft|style|styleSheets|status|statusText|statusbar|siblingBelow|siblingAbove|source|suffixes|security|securityPolicy|selection|self|history|host|hostname|hash|hasFocus|XMLDocument|XSLDocument|next|namespaces|namespaceURI|nameProp|MIN_VALUE|MAX_VALUE|characterSet|constructor|controllers|cookieEnabled|colorDepth|components|complete|current|cpuClass|clip|clipBoardData|clientInformation|closed|classes|callee|caller|crypto|toolbar|top|textTransform|textIndent|textDecoration|textAlign|tags|innerHeight|innerWidth|input|ids|ignoreCase|zIndex|oscpu|onreadystatechange|onLine|outerHeight|outerWidth|opsProfile|opener|offscreenBuffering|NEGATIVE_INFINITY|display|dialogHeight|dialogTop|dialogWidth|dialogLeft|dialogArguments|directories|description|defaultStatus|defaultChecked|defaultCharset|defaultView|userProfile|userLanguage|userAgent|uniqueID|undefined|updateInterval|_content|pixelDepth|port|personalbar|pkcs11|plugins|platform|pathname|paddingRight|paddingBottom|paddingTop|paddingLeft|parent|parentWindow|parentLayer|pageX|pageXOffset|pageY|pageYOffset|protocol|prototype|product|productSub|prompter|previous|prefix|encoding|enabledPlugin|external|expando|embeds|visiblity|vendor|vendorSub|vLinkcolor|URLUnencoded|POSITIVE_INFINITY|filename|fontSize|fontFamily|fontWeight|formName|frames|frameElement|fgColor|whiteSpace|listStyleType|lineHeight|linkColor|location|locationbar|localName|lowsrc|length|left|leftContext|lastModified|lastMatch|lastIndex|lastParen|layers|layerX|language|appMinorVersion|appName|appCodeName|appCore|appVersion|availHeight|availTop|availWidth|availLeft|all|arity|arguments|aLinkcolor|above|right|rightContext|responseXML|responeText|readyState|global|x|y|z|mimeTypes|multiline|menubar|marginRight|marginBottom|marginTop|marginLeft|bottom|border(Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth)|bufferDepth|below|backgroundColor|backgroundImage)\\b",
|
895
937
|
"captures": {
|
896
938
|
"1": {
|
897
939
|
"name": "meta.delimiter.property.period.js"
|
@@ -1431,7 +1473,7 @@
|
|
1431
1473
|
"name": "support.function.event-handler.js"
|
1432
1474
|
},
|
1433
1475
|
{
|
1434
|
-
"match": "(?x)\n\\b(shift|showModelessDialog|showModalDialog|showHelp|scroll|scrollX|scrollByPages|\nscrollByLines|scrollY|scrollTo|stop|strike|
|
1476
|
+
"match": "(?x)\n\\b(shift|showModelessDialog|showModalDialog|showHelp|scroll|scrollX|scrollByPages|\nscrollByLines|scrollY|scrollTo|stop|strike|sizeToContent|sidebar|signText|sort|\nsup|sub|substr|substring|splice|split|send|set(Milliseconds|Seconds|Minutes|Hours|\nMonth|Year|FullYear|Date|UTC(Milliseconds|Seconds|Minutes|Hours|Month|FullYear|Date)|\nTime|Hotkeys|Cursor|ZOptions|Active|Resizable|RequestHeader)|search|slice|\nsavePreferences|small|home|handleEvent|navigate|char|charCodeAt|charAt|concat|\ncontextual|confirm|compile|clear|captureEvents|call|createStyleSheet|createPopup|\ncreateEventObject|to(GMTString|UTCString|String|Source|UpperCase|LowerCase|LocaleString)|\ntest|taint|taintEnabled|indexOf|italics|disableExternalCapture|dump|detachEvent|unshift|\nuntaint|unwatch|updateCommands|join|javaEnabled|pop|push|plugins.refresh|paddings|parse|\nprint|prompt|preference|enableExternalCapture|elementFromPoint|exec|execScript|\nexecCommand|valueOf|UTC|queryCommandState|queryCommandIndeterm|queryCommandEnabled|\nqueryCommandValue|find|file|fileModifiedDate|fileSize|fileCreatedDate|fileUpdatedDate|\nfixed|fontsize|fontcolor|forward|fromCharCode|watch|link|load|lastIndexOf|\nanchor|attachEvent|atob|apply|alert|abort|routeEvents|\nresize|resizeBy|resizeTo|recalc|returnValue|replace|reverse|reload|releaseCapture|\nreleaseEvents|go|get(Milliseconds|Seconds|Minutes|Hours|Month|Day|Year|FullYear|\nTime|Date|TimezoneOffset|UTC(Milliseconds|Seconds|Minutes|Hours|Day|Month|FullYear|Date)|\nAttention|Selection|ResponseHeader|AllResponseHeaders)|moveBy|moveBelow|moveTo|\nmoveToAbsolute|moveAbove|mergeAttributes|match|margins|btoa|big|bold|borderWidths|blink|back)\\b",
|
1435
1477
|
"name": "support.function.js"
|
1436
1478
|
},
|
1437
1479
|
{
|
data/grammars/source.js.jsx.json
CHANGED
@@ -7,6 +7,7 @@
|
|
7
7
|
"fileTypes": [
|
8
8
|
"js",
|
9
9
|
"es6",
|
10
|
+
"es",
|
10
11
|
"babel",
|
11
12
|
"jsx",
|
12
13
|
"flow"
|
@@ -135,6 +136,9 @@
|
|
135
136
|
},
|
136
137
|
{
|
137
138
|
"include": "#literal-comma"
|
139
|
+
},
|
140
|
+
{
|
141
|
+
"include": "#miscellaneous"
|
138
142
|
}
|
139
143
|
]
|
140
144
|
},
|
@@ -151,7 +155,7 @@
|
|
151
155
|
{
|
152
156
|
"comment": "e.g. play: function(arg1, arg2) { }",
|
153
157
|
"name": "meta.function.json.js",
|
154
|
-
"begin": "\\s
|
158
|
+
"begin": "\\s*+([_$a-zA-Z][$\\w]*)\\s*+(:)\\s*+(?:(async)\\s+)?\\s*+(\\bfunction\\b)\\s*+(?:(\\*)\\s*)?\\s*(?=\\(|<)",
|
155
159
|
"end": "(?=\\{)",
|
156
160
|
"applyEndPatternLast": 1,
|
157
161
|
"beginCaptures": {
|
@@ -180,7 +184,7 @@
|
|
180
184
|
{
|
181
185
|
"comment": "e.g. 'play': function(arg1, arg2) { }",
|
182
186
|
"name": "meta.function.json.js",
|
183
|
-
"begin": "\\s
|
187
|
+
"begin": "\\s*+(('|\\\")(\\b[_$a-zA-Z][$\\w]*)(\\k<2>))\\s*+(:)\\s*+(async)?\\s*+(\\bfunction\\b)\\s*(\\*\\s*)?\\s*(?=\\(|<)",
|
184
188
|
"end": "(?=\\{)",
|
185
189
|
"applyEndPatternLast": 1,
|
186
190
|
"beginCaptures": {
|
@@ -222,7 +226,7 @@
|
|
222
226
|
{
|
223
227
|
"comment": "e.g. play: async <T>(args) => { }",
|
224
228
|
"name": "meta.function.json.arrow.js",
|
225
|
-
"begin": "\\s
|
229
|
+
"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*+(\\s*([\"']).*?\\k<-1>(?<!\\\\.))|\\s*[x0-9A-Fa-f]+))*\\s*=>)",
|
226
230
|
"end": "\\s*(=>)",
|
227
231
|
"applyEndPatternLast": 1,
|
228
232
|
"beginCaptures": {
|
@@ -250,7 +254,7 @@
|
|
250
254
|
{
|
251
255
|
"comment": "e.g. play: arg => { }",
|
252
256
|
"name": "meta.function.json.arrow.js",
|
253
|
-
"begin": "\\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*+(\\s*([\"']).*?\\k<-1>(?<!\\\\.))|\\s*+[x0-9A-Fa-f]+))*\\s*+=>)",
|
254
258
|
"end": "\\s*(=>)",
|
255
259
|
"beginCaptures": {
|
256
260
|
"1": {
|
@@ -280,7 +284,7 @@
|
|
280
284
|
{
|
281
285
|
"comment": "e.g. 'play': (args) => { }",
|
282
286
|
"name": "meta.function.json.arrow.js",
|
283
|
-
"begin": "\\s
|
287
|
+
"begin": "\\s*+(('|\\\")(\\b[_$a-zA-Z][$\\w]*)(\\k<2>))\\s*(:)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\g<-1>)*\\))\\s*+(?:\\s*+(:|\\|)(\\s*+[$_a-zA-Z0-9]+(<(?:(?>[^<>]+)|\\g<-1>)*>)?|\\s*+(\\{(?:(?>[^{}]+)|\\g<-1>)*\\})|\\s*+(\\s*+([\"']).*?\\k<-1>(?<!\\\\.))|\\s*+[x0-9A-Fa-f]+))*\\s*+=>)",
|
284
288
|
"end": "\\s*(=>)",
|
285
289
|
"applyEndPatternLast": 1,
|
286
290
|
"endCaptures": {
|
@@ -317,7 +321,7 @@
|
|
317
321
|
{
|
318
322
|
"comment": "e.g. 'play': arg => { }",
|
319
323
|
"name": "meta.function.json.arrow.js",
|
320
|
-
"begin": "\\s
|
324
|
+
"begin": "\\s*+(('|\\\")(\\b[_$a-zA-Z][$\\w]*)(\\k<2>))\\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*+(\\s*+([\"']).*?\\k<-1>(?<!\\\\.))|\\s*+[x0-9A-Fa-f]+))*\\s*+=>)",
|
321
325
|
"end": "\\s*(=>)",
|
322
326
|
"beginCaptures": {
|
323
327
|
"1": {
|
@@ -359,7 +363,7 @@
|
|
359
363
|
"patterns": [
|
360
364
|
{
|
361
365
|
"comment": "string as a property name",
|
362
|
-
"match": "\\s
|
366
|
+
"match": "\\s*+(?<!\\.|\\?|\\?\\s|\\?\\s\\s)(((\\\")(\\\\.|[^\\\\\"])*(\\\"))|((')(\\\\.|[^\\\\'])*(')))\\s*+(:)",
|
363
367
|
"captures": {
|
364
368
|
"1": {
|
365
369
|
"name": "constant.other.object.key.js"
|
@@ -389,8 +393,8 @@
|
|
389
393
|
},
|
390
394
|
{
|
391
395
|
"comment": "[something] : as property name",
|
392
|
-
"begin": "\\s
|
393
|
-
"end": "\\s*(\\])\\s
|
396
|
+
"begin": "\\s*+(?<!\\.|\\?|\\?\\s|\\?\\s\\s)(\\[)(?=(?:[^\\[]+)*?\\]\\s*+(:)(?=\\s*+\\S))",
|
397
|
+
"end": "\\s*(\\])\\s*+(:)",
|
394
398
|
"beginCaptures": {
|
395
399
|
"1": {
|
396
400
|
"name": "meta.brace.square.js"
|
@@ -412,7 +416,7 @@
|
|
412
416
|
},
|
413
417
|
{
|
414
418
|
"name": "constant.other.object.key.js",
|
415
|
-
"match": "\\s
|
419
|
+
"match": "\\s*+(?<!\\.|\\?|\\?\\s|\\?\\s\\s)\\s*+([_$a-zA-Z][$\\w]*)\\s*+(:)",
|
416
420
|
"captures": {
|
417
421
|
"1": {
|
418
422
|
"name": "string.unquoted.js"
|
@@ -431,7 +435,7 @@
|
|
431
435
|
},
|
432
436
|
{
|
433
437
|
"name": "keyword.control.flow.js",
|
434
|
-
"match": "\\s
|
438
|
+
"match": "\\s*+(?<!\\.)\\b(yield)\\b(?:\\s*+(\\*))?",
|
435
439
|
"captures": {
|
436
440
|
"1": {
|
437
441
|
"name": "keyword.control.flow.js"
|
@@ -443,19 +447,19 @@
|
|
443
447
|
},
|
444
448
|
{
|
445
449
|
"name": "keyword.control.flow.js",
|
446
|
-
"match": "\\s
|
450
|
+
"match": "\\s*+(?<!\\.)\\b(await|return)\\b"
|
447
451
|
},
|
448
452
|
{
|
449
453
|
"name": "keyword.control.conditional.js",
|
450
|
-
"match": "\\s
|
454
|
+
"match": "\\s*+(?<!\\.)\\b(if|else)\\b"
|
451
455
|
},
|
452
456
|
{
|
453
457
|
"name": "keyword.control.trycatch.js",
|
454
|
-
"match": "\\s
|
458
|
+
"match": "\\s*+(?<!\\.)\\b(catch|finally|throw|try)\\b"
|
455
459
|
},
|
456
460
|
{
|
457
461
|
"name": "keyword.control.loop.js",
|
458
|
-
"match": "\\s
|
462
|
+
"match": "\\s*+(?<!\\.)\\b(break|continue|do|goto|while)\\b"
|
459
463
|
}
|
460
464
|
]
|
461
465
|
},
|
@@ -463,7 +467,7 @@
|
|
463
467
|
"patterns": [
|
464
468
|
{
|
465
469
|
"name": "meta.for.js",
|
466
|
-
"begin": "\\s
|
470
|
+
"begin": "\\s*+(?<!\\.)\\b(for)\\b",
|
467
471
|
"end": "\\s*\\)",
|
468
472
|
"endCaptures": {
|
469
473
|
"0": {
|
@@ -477,7 +481,7 @@
|
|
477
481
|
},
|
478
482
|
"patterns": [
|
479
483
|
{
|
480
|
-
"begin": "\\s
|
484
|
+
"begin": "\\s*+\\(",
|
481
485
|
"end": "\\s*(?=\\))",
|
482
486
|
"beginCaptures": {
|
483
487
|
"0": {
|
@@ -504,7 +508,7 @@
|
|
504
508
|
"patterns": [
|
505
509
|
{
|
506
510
|
"name": "meta.switch.js",
|
507
|
-
"begin": "\\s
|
511
|
+
"begin": "\\s*+(?<!\\.)\\b(switch)\\b",
|
508
512
|
"end": "\\s*\\}",
|
509
513
|
"beginCaptures": {
|
510
514
|
"1": {
|
@@ -521,7 +525,7 @@
|
|
521
525
|
"include": "#round-brackets"
|
522
526
|
},
|
523
527
|
{
|
524
|
-
"begin": "\\s
|
528
|
+
"begin": "\\s*+\\{",
|
525
529
|
"end": "\\s*(?=})",
|
526
530
|
"beginCaptures": {
|
527
531
|
"0": {
|
@@ -530,7 +534,7 @@
|
|
530
534
|
},
|
531
535
|
"patterns": [
|
532
536
|
{
|
533
|
-
"begin": "\\s
|
537
|
+
"begin": "\\s*+(?<!\\.)\\b(case|default)\\b",
|
534
538
|
"end": "\\s*(:)",
|
535
539
|
"beginCaptures": {
|
536
540
|
"1": {
|
@@ -575,7 +579,7 @@
|
|
575
579
|
{
|
576
580
|
"comment": "try to avoid ternary operators which have a '? some chars :'",
|
577
581
|
"name": "meta.group.braces.round",
|
578
|
-
"begin": "(^|:|;|=|(?<=:|;|=))\\s
|
582
|
+
"begin": "(^|:|;|=|(?<=:|;|=))\\s*+(\\((?=((\"|').*?(?<=[^\\\\])\\k<-1>|[^?:])*(:|\\?\\s*+:)))",
|
579
583
|
"end": "\\s*\\)",
|
580
584
|
"beginCaptures": {
|
581
585
|
"2": {
|
@@ -598,7 +602,7 @@
|
|
598
602
|
},
|
599
603
|
{
|
600
604
|
"name": "meta.group.braces.round",
|
601
|
-
"begin": "\\s
|
605
|
+
"begin": "\\s*+\\(",
|
602
606
|
"end": "\\s*\\)",
|
603
607
|
"endCaptures": {
|
604
608
|
"0": {
|
@@ -622,7 +626,7 @@
|
|
622
626
|
"patterns": [
|
623
627
|
{
|
624
628
|
"name": "meta.group.braces.square",
|
625
|
-
"begin": "\\s
|
629
|
+
"begin": "\\s*+\\[",
|
626
630
|
"end": "\\s*\\]",
|
627
631
|
"endCaptures": {
|
628
632
|
"0": {
|
@@ -646,7 +650,7 @@
|
|
646
650
|
"patterns": [
|
647
651
|
{
|
648
652
|
"name": "meta.group.braces.curly",
|
649
|
-
"begin": "\\s
|
653
|
+
"begin": "\\s*+\\{",
|
650
654
|
"end": "\\s*\\}",
|
651
655
|
"endCaptures": {
|
652
656
|
"0": {
|
@@ -675,7 +679,7 @@
|
|
675
679
|
},
|
676
680
|
{
|
677
681
|
"comment": "additional jsdoc keywords",
|
678
|
-
"match": "(?<!\\w)@(access|also|arg|arguments|augments|borrows|callback|classdesc|constant|const|constructs|copyright|default|defaultvalue|desc|description|emits|exception|exports|external|file|fileoverview|function|func|global|host|implements|inner|instance|interface|kind|lends|license|listens|memberof|mixes|mixin|module|name|
|
682
|
+
"match": "(?<!\\w)@(access|also|arg|arguments|augments|borrows|borrowsThis|callback|callbackDocument|classdesc|constant|const|constructs|copyright|default|defaultvalue|desc|description|emits|exception|exports|external|file|fileoverview|function|func|global|host|implements|inner|instance|interface|kind|lends|license|listens|link|linkcode|linkplain|memberof|mixes|mixin|module|name|namespace|overview|prop|public|returns|see|summary|this|todo|tutorial|typedef|undocumented|variation|version|virtual)\\b",
|
679
683
|
"name": "storage.type.class.jsdoc"
|
680
684
|
},
|
681
685
|
{
|
@@ -692,7 +696,7 @@
|
|
692
696
|
},
|
693
697
|
{
|
694
698
|
"name": "comment.block.documentation.js",
|
695
|
-
"begin": "\\s
|
699
|
+
"begin": "\\s*+/\\*\\*(?!/)",
|
696
700
|
"end": "\\s*\\*/",
|
697
701
|
"captures": {
|
698
702
|
"0": {
|
@@ -707,7 +711,7 @@
|
|
707
711
|
},
|
708
712
|
{
|
709
713
|
"name": "comment.block.js",
|
710
|
-
"begin": "\\s
|
714
|
+
"begin": "\\s*+/\\*",
|
711
715
|
"end": "\\s*\\*/",
|
712
716
|
"captures": {
|
713
717
|
"0": {
|
@@ -717,7 +721,7 @@
|
|
717
721
|
},
|
718
722
|
{
|
719
723
|
"name": "comment.block.html.js",
|
720
|
-
"match": "\\s
|
724
|
+
"match": "\\s*+(<!--|-->)",
|
721
725
|
"captures": {
|
722
726
|
"0": {
|
723
727
|
"name": "punctuation.definition.comment.js"
|
@@ -726,7 +730,7 @@
|
|
726
730
|
},
|
727
731
|
{
|
728
732
|
"name": "comment.line.double-slash.js",
|
729
|
-
"begin": "\\s
|
733
|
+
"begin": "\\s*+(//)",
|
730
734
|
"end": "\\s*$",
|
731
735
|
"beginCaptures": {
|
732
736
|
"1": {
|
@@ -749,7 +753,7 @@
|
|
749
753
|
"patterns": [
|
750
754
|
{
|
751
755
|
"name": "comment.block.conditional.js",
|
752
|
-
"begin": "\\s
|
756
|
+
"begin": "\\s*+/\\*(?=@)",
|
753
757
|
"end": "\\s*\\*/",
|
754
758
|
"captures": {
|
755
759
|
"0": {
|
@@ -767,7 +771,7 @@
|
|
767
771
|
"patterns": [
|
768
772
|
{
|
769
773
|
"name": "punctuation.definition.comment.js",
|
770
|
-
"match": "\\s
|
774
|
+
"match": "\\s*+/\\*"
|
771
775
|
},
|
772
776
|
{
|
773
777
|
"include": "$self"
|
@@ -776,7 +780,7 @@
|
|
776
780
|
},
|
777
781
|
{
|
778
782
|
"name": "keyword.control.conditional.js",
|
779
|
-
"match": "\\s
|
783
|
+
"match": "\\s*+(?!@)(@)(if|elif|else|end|ifdef|endif|cc_on|set)\\b",
|
780
784
|
"captures": {
|
781
785
|
"1": {
|
782
786
|
"name": "punctuation.definition.keyword.js"
|
@@ -785,7 +789,7 @@
|
|
785
789
|
},
|
786
790
|
{
|
787
791
|
"name": "variable.other.conditional.js",
|
788
|
-
"match": "\\s
|
792
|
+
"match": "\\s*+(?!@)(@)(_win32|_win16|_mac|_alpha|_x86|_mc680x0|_PowerPC|_jscript|_jscript_build|_jscript_version|_debug|_fast|[a-zA-Z]\\w+)",
|
789
793
|
"captures": {
|
790
794
|
"1": {
|
791
795
|
"name": "punctuation.definition.variable.js"
|
@@ -808,7 +812,7 @@
|
|
808
812
|
"patterns": [
|
809
813
|
{
|
810
814
|
"name": "punctuation.terminator.statement.js",
|
811
|
-
"match": "\\s
|
815
|
+
"match": "\\s*+\\;"
|
812
816
|
}
|
813
817
|
]
|
814
818
|
},
|
@@ -816,7 +820,7 @@
|
|
816
820
|
"patterns": [
|
817
821
|
{
|
818
822
|
"name": "meta.delimiter.comma.js",
|
819
|
-
"match": "\\s
|
823
|
+
"match": "\\s*+,"
|
820
824
|
}
|
821
825
|
]
|
822
826
|
},
|
@@ -824,7 +828,7 @@
|
|
824
828
|
"patterns": [
|
825
829
|
{
|
826
830
|
"comment": "these statements must end in a ;",
|
827
|
-
"begin": "\\s
|
831
|
+
"begin": "\\s*+(?<!\\.)\\b(const|let|var)\\b\\s+(?=[$_\\p{L}](?:[$\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}-]*+\\s*+:))",
|
828
832
|
"end": "\\s*\\;",
|
829
833
|
"beginCaptures": {
|
830
834
|
"1": {
|
@@ -844,7 +848,7 @@
|
|
844
848
|
},
|
845
849
|
{
|
846
850
|
"comment": "these statements must end in a ;",
|
847
|
-
"begin": "\\s
|
851
|
+
"begin": "\\s*+(?<!\\.)\\b(const|let|var)\\b\\s+(?=(\\{(?:(?>[^{}]+)|\\g<-1>)*\\})\\s*+:)",
|
848
852
|
"end": "\\s*\\;",
|
849
853
|
"beginCaptures": {
|
850
854
|
"1": {
|
@@ -864,7 +868,7 @@
|
|
864
868
|
},
|
865
869
|
{
|
866
870
|
"comment": "these statements must end in a ;",
|
867
|
-
"begin": "\\s
|
871
|
+
"begin": "\\s*+(?<!\\.)\\b(const|let|var)\\b\\s+(?=(\\[(?:(?>[^\\[\\]]+)|\\g<-1>)*\\])\\s*+:)",
|
868
872
|
"end": "\\s*\\;",
|
869
873
|
"beginCaptures": {
|
870
874
|
"1": {
|
@@ -885,7 +889,7 @@
|
|
885
889
|
{
|
886
890
|
"comment": "var statements that done start with a flow indicator",
|
887
891
|
"name": "storage.type.js",
|
888
|
-
"match": "\\s
|
892
|
+
"match": "\\s*+(?<!\\.)\\b(const|let|var)\\b"
|
889
893
|
}
|
890
894
|
]
|
891
895
|
},
|
@@ -894,8 +898,8 @@
|
|
894
898
|
{
|
895
899
|
"comment": "e.g. function play<T>(arg1, arg2) { }",
|
896
900
|
"name": "meta.function.js",
|
897
|
-
"begin": "\\s
|
898
|
-
"end": "(?=\\s
|
901
|
+
"begin": "\\s*+(?:\\b(async)\\b\\s+)?\\s*+(\\bfunction\\b)\\s*+(\\*?)\\s*+([_$a-zA-Z][$\\w]*)?\\s*+(?=\\(|<)",
|
902
|
+
"end": "(?=\\s*+\\{)",
|
899
903
|
"applyEndPatternLast": 1,
|
900
904
|
"beginCaptures": {
|
901
905
|
"1": {
|
@@ -920,8 +924,8 @@
|
|
920
924
|
{
|
921
925
|
"comment": "e.g. play = function(arg1, arg2) { }",
|
922
926
|
"name": "meta.function.js",
|
923
|
-
"begin": "\\s
|
924
|
-
"end": "(?=\\s
|
927
|
+
"begin": "\\s*+(\\b[_$a-zA-Z][$\\w]*)\\s*+(=)\\s*+(?:(async)\\s+)?\\s*+(\\bfunction\\b)\\s*+(\\*?)\\s*+([_$a-zA-Z][$\\w]*)?\\s*+(?=\\(|<)",
|
928
|
+
"end": "(?=\\s*+\\{)",
|
925
929
|
"applyEndPatternLast": 1,
|
926
930
|
"beginCaptures": {
|
927
931
|
"1": {
|
@@ -952,8 +956,8 @@
|
|
952
956
|
{
|
953
957
|
"comment": "e.g. Sound.prototype.play = function(arg1, arg2) { }",
|
954
958
|
"name": "meta.prototype.function.js",
|
955
|
-
"begin": "\\s
|
956
|
-
"end": "(?=\\s
|
959
|
+
"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*+(?=\\(|<)",
|
960
|
+
"end": "(?=\\s*+\\{)",
|
957
961
|
"applyEndPatternLast": 1,
|
958
962
|
"beginCaptures": {
|
959
963
|
"1": {
|
@@ -996,8 +1000,8 @@
|
|
996
1000
|
{
|
997
1001
|
"comment": "e.g. Sound.play = function(arg1, arg2) { }",
|
998
1002
|
"name": "meta.function.static.js",
|
999
|
-
"begin": "\\s
|
1000
|
-
"end": "(?=\\s
|
1003
|
+
"begin": "\\s*+(\\b_?[A-Z][$\\w]*)?(\\.)([_$a-zA-Z][$\\w]*)\\s*+(=)\\s*+(?:(async)\\s+)?\\s*+(\\bfunction\\b)\\s*+(\\*?)\\s*+([_$a-zA-Z][$\\w]*)?\\s*+(?=\\(|<)",
|
1004
|
+
"end": "(?=\\s*+\\{)",
|
1001
1005
|
"applyEndPatternLast": 1,
|
1002
1006
|
"beginCaptures": {
|
1003
1007
|
"1": {
|
@@ -1037,7 +1041,7 @@
|
|
1037
1041
|
"patterns": [
|
1038
1042
|
{
|
1039
1043
|
"name": "string.quasi.js",
|
1040
|
-
"begin": "\\s
|
1044
|
+
"begin": "\\s*+([a-zA-Z$_][\\w$_]*)?(`)",
|
1041
1045
|
"end": "\\s*(?<!\\\\)`",
|
1042
1046
|
"beginCaptures": {
|
1043
1047
|
"1": {
|
@@ -1084,39 +1088,39 @@
|
|
1084
1088
|
"patterns": [
|
1085
1089
|
{
|
1086
1090
|
"name": "keyword.operator.js",
|
1087
|
-
"match": "\\s
|
1091
|
+
"match": "\\s*+(?<!\\.)\\b(delete|in|instanceof|new|of|typeof|void|with)\\b"
|
1088
1092
|
},
|
1089
1093
|
{
|
1090
1094
|
"name": "keyword.operator.logical.js",
|
1091
|
-
"match": "\\s
|
1095
|
+
"match": "\\s*+(!(?!=)|&&|\\|\\|)"
|
1092
1096
|
},
|
1093
1097
|
{
|
1094
1098
|
"name": "keyword.operator.assignment.js",
|
1095
|
-
"match": "\\s
|
1099
|
+
"match": "\\s*+(=(?!(=|>)))"
|
1096
1100
|
},
|
1097
1101
|
{
|
1098
1102
|
"name": "keyword.operator.assignment.augmented.js",
|
1099
|
-
"match": "\\s
|
1103
|
+
"match": "\\s*+(%=|&=|\\*=|\\+=|-=|/=|\\^=|\\|=|<<=|>>=|>>>=)"
|
1100
1104
|
},
|
1101
1105
|
{
|
1102
1106
|
"name": "keyword.operator.bitwise.js",
|
1103
|
-
"match": "\\s
|
1107
|
+
"match": "\\s*+(~|<<|>>>|>>|&|\\^|\\|)"
|
1104
1108
|
},
|
1105
1109
|
{
|
1106
1110
|
"name": "keyword.operator.relational.js",
|
1107
|
-
"match": "\\s
|
1111
|
+
"match": "\\s*+(<=|>=|<|>)"
|
1108
1112
|
},
|
1109
1113
|
{
|
1110
1114
|
"name": "keyword.operator.comparison.js",
|
1111
|
-
"match": "\\s
|
1115
|
+
"match": "\\s*+(===|!==|==|!=)"
|
1112
1116
|
},
|
1113
1117
|
{
|
1114
1118
|
"name": "keyword.operator.arithmetic.js",
|
1115
|
-
"match": "\\s
|
1119
|
+
"match": "\\s*+(--|\\+\\+|/(?!/|\\*)|%|\\*(?<!/\\*)|\\+|-)"
|
1116
1120
|
},
|
1117
1121
|
{
|
1118
1122
|
"comment": "ternary operator - make sure end : is consumed to avoid mistake as flow type",
|
1119
|
-
"begin": "\\s
|
1123
|
+
"begin": "\\s*+(\\?)",
|
1120
1124
|
"end": "\\s*(:)",
|
1121
1125
|
"beginCaptures": {
|
1122
1126
|
"1": {
|
@@ -1136,7 +1140,7 @@
|
|
1136
1140
|
},
|
1137
1141
|
{
|
1138
1142
|
"name": "keyword.operator.spread.js",
|
1139
|
-
"match": "\\s
|
1143
|
+
"match": "\\s*+(?<!\\.)\\.\\.\\."
|
1140
1144
|
},
|
1141
1145
|
{
|
1142
1146
|
"name": "keyword.operator.accessor.js",
|
@@ -1149,7 +1153,7 @@
|
|
1149
1153
|
"patterns": [
|
1150
1154
|
{
|
1151
1155
|
"name": "meta.function-call.without-arguments.js",
|
1152
|
-
"begin": "\\s
|
1156
|
+
"begin": "\\s*+([_$a-zA-Z][$\\w]*)\\s*+(?=\\(\\s*+\\))",
|
1153
1157
|
"end": "\\s*(?<=\\))",
|
1154
1158
|
"beginCaptures": {
|
1155
1159
|
"1": {
|
@@ -1164,7 +1168,7 @@
|
|
1164
1168
|
},
|
1165
1169
|
{
|
1166
1170
|
"name": "meta.function-call.without-arguments.js",
|
1167
|
-
"begin": "\\s
|
1171
|
+
"begin": "\\s*+(?=(\\[(?:(?>[^\\[\\]]+)|\\g<-1>)*\\])\\s*+\\(\\s*+\\))",
|
1168
1172
|
"end": "(?=.)",
|
1169
1173
|
"applyEndPatternLast": 1,
|
1170
1174
|
"patterns": [
|
@@ -1178,7 +1182,7 @@
|
|
1178
1182
|
},
|
1179
1183
|
{
|
1180
1184
|
"name": "meta.function-call.with-arguments.js",
|
1181
|
-
"begin": "\\s
|
1185
|
+
"begin": "\\s*+([_$a-zA-Z][$\\w]*)\\s*+(?=\\()",
|
1182
1186
|
"end": "(?=.)",
|
1183
1187
|
"applyEndPatternLast": 1,
|
1184
1188
|
"beginCaptures": {
|
@@ -1194,7 +1198,7 @@
|
|
1194
1198
|
},
|
1195
1199
|
{
|
1196
1200
|
"name": "meta.function-call.without-arguments.js",
|
1197
|
-
"begin": "\\s
|
1201
|
+
"begin": "\\s*+(?=(\\[(?:(?>[^\\[\\]]+)|\\g<-1>)*\\])\\s*+\\()",
|
1198
1202
|
"end": "(?=.)",
|
1199
1203
|
"applyEndPatternLast": 1,
|
1200
1204
|
"patterns": [
|
@@ -1212,23 +1216,23 @@
|
|
1212
1216
|
"patterns": [
|
1213
1217
|
{
|
1214
1218
|
"name": "constant.language.boolean.true.js",
|
1215
|
-
"match": "\\s
|
1219
|
+
"match": "\\s*+(?<!\\.)\\btrue\\b"
|
1216
1220
|
},
|
1217
1221
|
{
|
1218
1222
|
"name": "constant.language.boolean.false.js",
|
1219
|
-
"match": "\\s
|
1223
|
+
"match": "\\s*+(?<!\\.)\\bfalse\\b"
|
1220
1224
|
},
|
1221
1225
|
{
|
1222
1226
|
"name": "constant.language.null.js",
|
1223
|
-
"match": "\\s
|
1227
|
+
"match": "\\s*+(?<!\\.)\\bnull\\b"
|
1224
1228
|
},
|
1225
1229
|
{
|
1226
1230
|
"name": "constant.language.undefined.js",
|
1227
|
-
"match": "\\s
|
1231
|
+
"match": "\\s*+(?<!\\.)\\bundefined\\b"
|
1228
1232
|
},
|
1229
1233
|
{
|
1230
1234
|
"name": "constant.language.nan.js",
|
1231
|
-
"match": "\\s
|
1235
|
+
"match": "\\s*+(?<!\\.)\\bNaN\\b"
|
1232
1236
|
}
|
1233
1237
|
]
|
1234
1238
|
},
|
@@ -1236,11 +1240,11 @@
|
|
1236
1240
|
"patterns": [
|
1237
1241
|
{
|
1238
1242
|
"name": "support.class.builtin.js",
|
1239
|
-
"match": "\\s
|
1243
|
+
"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"
|
1240
1244
|
},
|
1241
1245
|
{
|
1242
1246
|
"name": "support.function.js",
|
1243
|
-
"match": "\\s
|
1247
|
+
"match": "\\s*+(?<!\\.)\\b(decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|isFinite|isNaN|parseFloat|parseInt|unescape)\\b"
|
1244
1248
|
},
|
1245
1249
|
{
|
1246
1250
|
"name": "support.function.mutator.js",
|
@@ -1248,22 +1252,22 @@
|
|
1248
1252
|
},
|
1249
1253
|
{
|
1250
1254
|
"name": "support.class.error.js",
|
1251
|
-
"match": "\\s
|
1255
|
+
"match": "\\s*+(?<!\\.)\\b((Eval|Range|Reference|Syntax|Type|URI)?Error)\\b"
|
1252
1256
|
},
|
1253
1257
|
{
|
1254
1258
|
"name": "keyword.other.js",
|
1255
|
-
"match": "\\s
|
1259
|
+
"match": "\\s*+(?<!\\.)\\b(debugger)\\b"
|
1256
1260
|
},
|
1257
1261
|
{
|
1258
1262
|
"name": "support.type.object.dom.js",
|
1259
|
-
"match": "\\s
|
1263
|
+
"match": "\\s*+(?<!\\.)\\b(document|window)\\b"
|
1260
1264
|
},
|
1261
1265
|
{
|
1262
1266
|
"name": "support.constant.dom.js",
|
1263
|
-
"match": "\\s
|
1267
|
+
"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"
|
1264
1268
|
},
|
1265
1269
|
{
|
1266
|
-
"match": "\\s
|
1270
|
+
"match": "\\s*+(?<!\\.)\\b(console)(?:(\\.)(warn|info|log|error|time|timeEnd|assert))?\\b",
|
1267
1271
|
"captures": {
|
1268
1272
|
"1": {
|
1269
1273
|
"name": "support.type.object.console.js"
|
@@ -1277,7 +1281,7 @@
|
|
1277
1281
|
}
|
1278
1282
|
},
|
1279
1283
|
{
|
1280
|
-
"match": "\\s
|
1284
|
+
"match": "\\s*+(?<!\\.)\\b(process)(?:(\\.)(stdout|stderr|stdin|argv|execPath|execArgv|env|exitCode|version|versions|config|pid|title|arch|platform|mainModule))?\\b",
|
1281
1285
|
"captures": {
|
1282
1286
|
"1": {
|
1283
1287
|
"name": "support.type.object.process.js"
|
@@ -1291,7 +1295,7 @@
|
|
1291
1295
|
}
|
1292
1296
|
},
|
1293
1297
|
{
|
1294
|
-
"match": "\\s
|
1298
|
+
"match": "\\s*+(?<!\\.)\\b(process)(?:(\\.)(abort|chdir|cwd|exit|getgid|setgid|getuid|setuid|setgroups|getgroups|initgroups|kill|memoryUsage|nextTick|umask|uptime|hrtime))?\\b",
|
1295
1299
|
"captures": {
|
1296
1300
|
"1": {
|
1297
1301
|
"name": "support.type.object.process.js"
|
@@ -1305,7 +1309,7 @@
|
|
1305
1309
|
}
|
1306
1310
|
},
|
1307
1311
|
{
|
1308
|
-
"match": "\\s
|
1312
|
+
"match": "\\s*+\\b(((?<!\\.)module\\.((?<!\\,)exports|id|require|parent|filename|loaded|children)|exports))\\b",
|
1309
1313
|
"captures": {
|
1310
1314
|
"1": {
|
1311
1315
|
"name": "support.type.object.module.js"
|
@@ -1320,15 +1324,15 @@
|
|
1320
1324
|
},
|
1321
1325
|
{
|
1322
1326
|
"name": "support.type.object.node.js",
|
1323
|
-
"match": "\\s
|
1327
|
+
"match": "\\s*+(?<!\\.)\\b(global|GLOBAL|root|__dirname|__filename)\\b"
|
1324
1328
|
},
|
1325
1329
|
{
|
1326
1330
|
"name": "support.class.node.js",
|
1327
|
-
"match": "\\s
|
1331
|
+
"match": "\\s*+\\b(Buffer|EventEmitter|Server|Pipe|Socket|REPLServer|ReadStream|WriteStream|Stream|Inflate|Deflate|InflateRaw|DeflateRaw|GZip|GUnzip|Unzip|Zip)\\b"
|
1328
1332
|
},
|
1329
1333
|
{
|
1330
1334
|
"name": "meta.tag.mustache.js",
|
1331
|
-
"begin": "\\s
|
1335
|
+
"begin": "\\s*+{{",
|
1332
1336
|
"end": "\\s*}}"
|
1333
1337
|
}
|
1334
1338
|
]
|
@@ -1337,7 +1341,7 @@
|
|
1337
1341
|
"patterns": [
|
1338
1342
|
{
|
1339
1343
|
"comment": "Classes",
|
1340
|
-
"begin": "\\s
|
1344
|
+
"begin": "\\s*+(?<!\\.)\\b(class)\\s+",
|
1341
1345
|
"end": "\\s*(})",
|
1342
1346
|
"beginCaptures": {
|
1343
1347
|
"0": {
|
@@ -1354,7 +1358,7 @@
|
|
1354
1358
|
},
|
1355
1359
|
"patterns": [
|
1356
1360
|
{
|
1357
|
-
"match": "\\s
|
1361
|
+
"match": "\\s*+\\b(extends)\\b\\s*+",
|
1358
1362
|
"captures": {
|
1359
1363
|
"0": {
|
1360
1364
|
"name": "meta.class.extends.js"
|
@@ -1371,7 +1375,7 @@
|
|
1371
1375
|
"include": "#flowtype-polymorphs"
|
1372
1376
|
},
|
1373
1377
|
{
|
1374
|
-
"begin": "\\s
|
1378
|
+
"begin": "\\s*+{",
|
1375
1379
|
"end": "\\s*(?=})",
|
1376
1380
|
"contentName": "meta.class.body.js",
|
1377
1381
|
"beginCaptures": {
|
@@ -1381,7 +1385,7 @@
|
|
1381
1385
|
},
|
1382
1386
|
"patterns": [
|
1383
1387
|
{
|
1384
|
-
"match": "\\s
|
1388
|
+
"match": "\\s*+\\b(?<!\\.)static\\b(?!\\.)",
|
1385
1389
|
"name": "storage.modifier.js"
|
1386
1390
|
},
|
1387
1391
|
{
|
@@ -1416,7 +1420,7 @@
|
|
1416
1420
|
{
|
1417
1421
|
"name": "meta.function-call.static.without-arguments.js",
|
1418
1422
|
"comment": "e.g Abc.aaa()",
|
1419
|
-
"match": "\\s
|
1423
|
+
"match": "\\s*+(?:(?<=\\.)|\\b)([A-Z][$\\w]*)\\s*+(\\.)([_$a-zA-Z][$\\w]*)\\s*+(\\(\\s*+\\))",
|
1420
1424
|
"captures": {
|
1421
1425
|
"1": {
|
1422
1426
|
"name": "variable.other.class.js"
|
@@ -1434,7 +1438,7 @@
|
|
1434
1438
|
},
|
1435
1439
|
{
|
1436
1440
|
"name": "meta.function-call.static.with-arguments.js",
|
1437
|
-
"match": "\\s
|
1441
|
+
"match": "\\s*+(?:(?<=\\.)|\\b)\\s*+([A-Z][$\\w]*)\\s*+(\\.)([_$a-zA-Z][$\\w]*)\\s*+(?=\\()",
|
1438
1442
|
"captures": {
|
1439
1443
|
"1": {
|
1440
1444
|
"name": "variable.other.class.js"
|
@@ -1449,7 +1453,7 @@
|
|
1449
1453
|
},
|
1450
1454
|
{
|
1451
1455
|
"name": "meta.function-call.method.without-arguments.js",
|
1452
|
-
"match": "\\s
|
1456
|
+
"match": "\\s*+(?<=\\.)\\s*+([_$a-zA-Z][$\\w]*)\\s*+(\\(\\s*+\\))",
|
1453
1457
|
"captures": {
|
1454
1458
|
"1": {
|
1455
1459
|
"name": "entity.name.function.js"
|
@@ -1461,7 +1465,7 @@
|
|
1461
1465
|
},
|
1462
1466
|
{
|
1463
1467
|
"name": "meta.function-call.method.with-arguments.js",
|
1464
|
-
"match": "\\s
|
1468
|
+
"match": "\\s*+(?<=\\.)([_$a-zA-Z][$\\w]*)\\s*+(?=\\()",
|
1465
1469
|
"captures": {
|
1466
1470
|
"1": {
|
1467
1471
|
"name": "entity.name.function.js"
|
@@ -1474,31 +1478,31 @@
|
|
1474
1478
|
"patterns": [
|
1475
1479
|
{
|
1476
1480
|
"name": "variable.language.arguments.js",
|
1477
|
-
"match": "\\s
|
1481
|
+
"match": "\\s*+(?<!(?<!\\.\\.)\\.)\\b(arguments)\\b"
|
1478
1482
|
},
|
1479
1483
|
{
|
1480
1484
|
"name": "variable.language.super.js",
|
1481
|
-
"match": "\\s
|
1485
|
+
"match": "\\s*+(?<!(?<!\\.\\.)\\.)\\b(super)\\b\\s*+(?!\\()"
|
1482
1486
|
},
|
1483
1487
|
{
|
1484
1488
|
"name": "variable.language.this.js",
|
1485
|
-
"match": "\\s
|
1489
|
+
"match": "\\s*+(?<!(?<!\\.\\.)\\.)\\b(this)\\b"
|
1486
1490
|
},
|
1487
1491
|
{
|
1488
1492
|
"name": "variable.language.self.js",
|
1489
|
-
"match": "\\s
|
1493
|
+
"match": "\\s*+(?<!(?<!\\.\\.)\\.)\\b(self)\\b\\s*+(?!\\()"
|
1490
1494
|
},
|
1491
1495
|
{
|
1492
1496
|
"name": "variable.language.proto.js",
|
1493
|
-
"match": "\\s
|
1497
|
+
"match": "\\s*+(?<=\\.)\\b(__proto__)\\b"
|
1494
1498
|
},
|
1495
1499
|
{
|
1496
1500
|
"name": "variable.language.constructor.js",
|
1497
|
-
"match": "\\s
|
1501
|
+
"match": "\\s*+(?<=\\.)\\b(constructor)\\b\\s*+(?!\\()"
|
1498
1502
|
},
|
1499
1503
|
{
|
1500
1504
|
"name": "variable.language.prototype.js",
|
1501
|
-
"match": "\\s
|
1505
|
+
"match": "\\s*+(?<=\\.)\\b(prototype)\\b"
|
1502
1506
|
}
|
1503
1507
|
]
|
1504
1508
|
},
|
@@ -1506,7 +1510,7 @@
|
|
1506
1510
|
"patterns": [
|
1507
1511
|
{
|
1508
1512
|
"name": "constant.character.escape.newline.js",
|
1509
|
-
"match": "
|
1513
|
+
"match": "\\\\\n"
|
1510
1514
|
},
|
1511
1515
|
{
|
1512
1516
|
"name": "constant.character.escape",
|
@@ -1525,23 +1529,7 @@
|
|
1525
1529
|
"literal-number": {
|
1526
1530
|
"patterns": [
|
1527
1531
|
{
|
1528
|
-
"match": "\\s
|
1529
|
-
"captures": {
|
1530
|
-
"1": {
|
1531
|
-
"name": "invalid.illegal.numeric.hex.js"
|
1532
|
-
}
|
1533
|
-
}
|
1534
|
-
},
|
1535
|
-
{
|
1536
|
-
"match": "\\s*((?:\\B[-+]|\\b)0[0-9]+\\.(\\B|\\b[0-9]+))",
|
1537
|
-
"captures": {
|
1538
|
-
"1": {
|
1539
|
-
"name": "invalid.illegal.numeric.octal.js"
|
1540
|
-
}
|
1541
|
-
}
|
1542
|
-
},
|
1543
|
-
{
|
1544
|
-
"match": "\\s*((?:\\B[-+])?(?:\\b0b[0-1]*|\\b0o[0-7]*|\\b0x[0-9a-f]*|(\\B\\.[0-9]+|\\b[0-9]+(\\.[0-9]*)?)(e[-+]?[0-9]+)?))",
|
1532
|
+
"match": "\\s*+((?:\\B[-+])?(?:\\b0[bB][0-1]*|\\b0[oO][0-7]*|\\b0[xX][0-9a-fA-F]*|(\\B\\.[0-9]+|\\b[0-9]+(\\.[0-9]*)?)([eE][-+]?[0-9]+)?))",
|
1545
1533
|
"captures": {
|
1546
1534
|
"1": {
|
1547
1535
|
"name": "constant.numeric.js"
|
@@ -1549,7 +1537,7 @@
|
|
1549
1537
|
}
|
1550
1538
|
},
|
1551
1539
|
{
|
1552
|
-
"match": "\\s
|
1540
|
+
"match": "\\s*+((?:\\B[-+]|\\b)(Infinity)\\b)",
|
1553
1541
|
"captures": {
|
1554
1542
|
"1": {
|
1555
1543
|
"name": "constant.language.infinity.js"
|
@@ -1563,7 +1551,7 @@
|
|
1563
1551
|
{
|
1564
1552
|
"disabled": 1,
|
1565
1553
|
"name": "meta.instance.constructor",
|
1566
|
-
"begin": "\\s
|
1554
|
+
"begin": "\\s*+(new)\\s+(?=[_$a-zA-Z][$\\w.]*)",
|
1567
1555
|
"end": "(?![_$a-zA-Z][$\\w.]*)",
|
1568
1556
|
"beginCaptures": {
|
1569
1557
|
"1": {
|
@@ -1591,7 +1579,7 @@
|
|
1591
1579
|
{
|
1592
1580
|
"comment": "e.g. (args) => { }",
|
1593
1581
|
"name": "meta.function.arrow.js",
|
1594
|
-
"begin": "\\s
|
1582
|
+
"begin": "\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\g<-1>)*\\))\\s*+(?:\\s*+(:|\\|)(\\s*+[$_a-zA-Z0-9]+(<(?:(?>[^<>]+)|\\g<-1>)*>)?|\\s*+(\\{(?:(?>[^{}]+)|\\g<-1>)*\\})|\\s*+(((')((?:[^']|\\\\')*)('))|\\s*+((\")((?:[^\"]|\\\\\")*)(\")))|\\s*+[x0-9A-Fa-f]+))*\\s*+=>)",
|
1595
1583
|
"end": "\\s*(=>)",
|
1596
1584
|
"applyEndPatternLast": 1,
|
1597
1585
|
"endCaptures": {
|
@@ -1613,7 +1601,7 @@
|
|
1613
1601
|
{
|
1614
1602
|
"comment": "e.g. arg => { }",
|
1615
1603
|
"name": "meta.function.arrow.js",
|
1616
|
-
"begin": "\\s
|
1604
|
+
"begin": "\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+([_$a-zA-Z][$\\w]*)\\s*+(?:\\s*+(:|\\|)(\\s*+[$_a-zA-Z0-9]+(<(?:(?>[^<>]+)|\\g<-1>)*>)?|\\s*+(\\{(?:(?>[^{}]+)|\\g<-1>)*\\})|\\s*+(((')((?:[^']|\\\\')*)('))|\\s*+((\")((?:[^\"]|\\\\\")*)(\")))|\\s*+[x0-9A-Fa-f]+))*\\s*+=>)",
|
1617
1605
|
"end": "\\s*(=>)",
|
1618
1606
|
"beginCaptures": {
|
1619
1607
|
"1": {
|
@@ -1637,7 +1625,7 @@
|
|
1637
1625
|
{
|
1638
1626
|
"comment": "e.g. play = (args) => { }",
|
1639
1627
|
"name": "meta.function.arrow.js",
|
1640
|
-
"begin": "\\s
|
1628
|
+
"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*+(((')((?:[^']|\\\\')*)('))|\\s*+((\")((?:[^\"]|\\\\\")*)(\")))|\\s*+[x0-9A-Fa-f]+))*\\s*+=>)",
|
1641
1629
|
"end": "\\s*(=>)",
|
1642
1630
|
"applyEndPatternLast": 1,
|
1643
1631
|
"beginCaptures": {
|
@@ -1665,7 +1653,7 @@
|
|
1665
1653
|
{
|
1666
1654
|
"comment": "e.g. play = arg => { }",
|
1667
1655
|
"name": "meta.function.arrow.js",
|
1668
|
-
"begin": "\\s
|
1656
|
+
"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*+(((')((?:[^']|\\\\')*)('))|\\s*+((\")((?:[^\"]|\\\\\")*)(\")))|\\s*+[x0-9A-Fa-f]+))*\\s*+=>)",
|
1669
1657
|
"end": "\\s*(=>)",
|
1670
1658
|
"beginCaptures": {
|
1671
1659
|
"1": {
|
@@ -1695,7 +1683,7 @@
|
|
1695
1683
|
{
|
1696
1684
|
"comment": "Sound.prototype.play = (args) => { }",
|
1697
1685
|
"name": "meta.prototype.function.arrow.js",
|
1698
|
-
"begin": "\\s
|
1686
|
+
"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*+(((')((?:[^']|\\\\')*)('))|\\s*+((\")((?:[^\"]|\\\\\")*)(\")))|\\s*+[x0-9A-Fa-f]+))*\\s*+=>)",
|
1699
1687
|
"end": "\\s*(=>)",
|
1700
1688
|
"applyEndPatternLast": 1,
|
1701
1689
|
"beginCaptures": {
|
@@ -1735,7 +1723,7 @@
|
|
1735
1723
|
{
|
1736
1724
|
"comment": "e.g. Sound.prototype.play = arg => { }",
|
1737
1725
|
"name": "meta.prototype.function.arrow.js",
|
1738
|
-
"begin": "\\s
|
1726
|
+
"begin": "\\s*+(\\b_?[A-Z][$\\w]*)?(\\.)(prototype)(\\.)([_$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*+(((')((?:[^']|\\\\')*)('))|\\s*+((\")((?:[^\"]|\\\\\")*)(\")))|\\s*+[x0-9A-Fa-f]+))*\\s*+=>)",
|
1739
1727
|
"end": "\\s*(=>)",
|
1740
1728
|
"beginCaptures": {
|
1741
1729
|
"1": {
|
@@ -1777,7 +1765,7 @@
|
|
1777
1765
|
{
|
1778
1766
|
"comment": "e.g. Sound.play = (args) => { }",
|
1779
1767
|
"name": "meta.function.static.arrow.js",
|
1780
|
-
"begin": "\\s
|
1768
|
+
"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*+(((')((?:[^']|\\\\')*)('))|\\s*+((\")((?:[^\"]|\\\\\")*)(\")))|\\s*+[x0-9A-Fa-f]+))*\\s*+=>)",
|
1781
1769
|
"end": "\\s*(=>)",
|
1782
1770
|
"applyEndPatternLast": 1,
|
1783
1771
|
"beginCaptures": {
|
@@ -1811,7 +1799,7 @@
|
|
1811
1799
|
{
|
1812
1800
|
"comment": "e.g. Sound.play = arg => { }",
|
1813
1801
|
"name": "meta.function.static.arrow.js",
|
1814
|
-
"begin": "\\s
|
1802
|
+
"begin": "\\s*+(\\b_?[A-Z][$\\w]*)?(\\.)([_$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*+(((')((?:[^']|\\\\')*)('))|\\s*+((\")((?:[^\"]|\\\\\")*)(\")))|\\s*+[x0-9A-Fa-f]+))*\\s*+=>)",
|
1815
1803
|
"end": "\\s*(=>)",
|
1816
1804
|
"beginCaptures": {
|
1817
1805
|
"1": {
|
@@ -1851,7 +1839,7 @@
|
|
1851
1839
|
{
|
1852
1840
|
"comment": "e.g. play<T,T>(arg1, arg2): Type<T> { }",
|
1853
1841
|
"name": "meta.function.method.js",
|
1854
|
-
"begin": "\\s
|
1842
|
+
"begin": "\\s*++(\\bstatic\\b)?\\s*++(\\basync\\b)?\\s*++(\\*?)\\s*++(?<!\\.)([_$a-zA-Z][$\\w]*)\\s*++(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?(\\())",
|
1855
1843
|
"end": "\\s*(?=.)",
|
1856
1844
|
"applyEndPatternLast": 1,
|
1857
1845
|
"beginCaptures": {
|
@@ -1877,7 +1865,7 @@
|
|
1877
1865
|
{
|
1878
1866
|
"comment": "e.g. [var]<T,T>(arg1, arg2): Type<T> { } or 'var'<T,T>(arg1, arg2)",
|
1879
1867
|
"name": "meta.function.method.js",
|
1880
|
-
"begin": "\\s
|
1868
|
+
"begin": "\\s*++(\\bstatic\\b)?\\s*++(\\basync\\b)?\\s*++(\\*?)\\s*++(?=((\\[(?:(?>[^\\[\\]]+)|\\g<-1>)*\\])|\\s*+(((')((?:[^']|\\\\')*)('))|\\s*+((\")((?:[^\"]|\\\\\")*)(\"))))\\s*+(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\())",
|
1881
1869
|
"end": "\\s*(?=.)",
|
1882
1870
|
"applyEndPatternLast": 1,
|
1883
1871
|
"beginCaptures": {
|
@@ -1912,7 +1900,7 @@
|
|
1912
1900
|
{
|
1913
1901
|
"comment": "getter/setter",
|
1914
1902
|
"name": "meta.accessor.js",
|
1915
|
-
"begin": "\\s
|
1903
|
+
"begin": "\\s*+\\b(?:(static)\\s+)?(get|set)\\s+([_$a-zA-Z][$\\w]*)\\s*+(?=\\()",
|
1916
1904
|
"end": "\\s*(?={)",
|
1917
1905
|
"applyEndPatternLast": 1,
|
1918
1906
|
"beginCaptures": {
|
@@ -1935,7 +1923,7 @@
|
|
1935
1923
|
{
|
1936
1924
|
"comment": "getter/setter set [var]() or get 'name'()",
|
1937
1925
|
"name": "meta.accessor.js",
|
1938
|
-
"begin": "\\s
|
1926
|
+
"begin": "\\s*+\\b(?:(static)\\s+)?(get|set)\\s+(?=((\\[(?:(?>[^\\[\\]]+)|\\g<-1>)*\\])|\\s*+(((')((?:[^']|\\\\')*)('))|\\s*+((\")((?:[^\"]|\\\\\")*)(\"))))\\s*+(\\())",
|
1939
1927
|
"end": "\\s*(?={)",
|
1940
1928
|
"applyEndPatternLast": 1,
|
1941
1929
|
"beginCaptures": {
|
@@ -1967,8 +1955,8 @@
|
|
1967
1955
|
"patterns": [
|
1968
1956
|
{
|
1969
1957
|
"name": "string.regexp.js",
|
1970
|
-
"begin": "(?<=\\.|\\(|,|{|}|\\[|;|,|<|>|<=|>=|==|!=|===|!==|\\+|-|\\*|%|\\+\\+|--|<<|>>|>>>|&|\\||\\^|!|~|&&|\\|\\||\\?|:|=|\\+=|-=|\\*=|%=|<<=|>>=|>>>=|&=|\\|=|\\^=|/|/=|\\Wnew|\\Wdelete|\\Wvoid|\\Wtypeof|\\Winstanceof|\\Win|\\Wdo|\\Wreturn|\\Wcase|\\Wthrow|^new|^delete|^void|^typeof|^instanceof|^in|^do|^return|^case|^throw|^)\\s
|
1971
|
-
"end": "(/)([
|
1958
|
+
"begin": "(?<=\\.|\\(|,|{|}|\\[|;|,|<|>|<=|>=|==|!=|===|!==|\\+|-|\\*|%|\\+\\+|--|<<|>>|>>>|&|\\||\\^|!|~|&&|\\|\\||\\?|:|=|\\+=|-=|\\*=|%=|<<=|>>=|>>>=|&=|\\|=|\\^=|/|/=|\\Wnew|\\Wdelete|\\Wvoid|\\Wtypeof|\\Winstanceof|\\Win|\\Wdo|\\Wreturn|\\Wcase|\\Wthrow|^new|^delete|^void|^typeof|^instanceof|^in|^do|^return|^case|^throw|^)\\s*+(/)(?!/|\\*|$)",
|
1959
|
+
"end": "(/)([gimyu]*)",
|
1972
1960
|
"beginCaptures": {
|
1973
1961
|
"1": {
|
1974
1962
|
"name": "punctuation.definition.string.begin.js"
|
@@ -1994,8 +1982,8 @@
|
|
1994
1982
|
"patterns": [
|
1995
1983
|
{
|
1996
1984
|
"contentName": "string.quoted.single.js",
|
1997
|
-
"begin": "\\s
|
1998
|
-
"end": "(('))|(
|
1985
|
+
"begin": "\\s*+(('))",
|
1986
|
+
"end": "\\s*+(?:(('))|(\n))",
|
1999
1987
|
"beginCaptures": {
|
2000
1988
|
"1": {
|
2001
1989
|
"name": "string.quoted.single.js"
|
@@ -2023,8 +2011,8 @@
|
|
2023
2011
|
},
|
2024
2012
|
{
|
2025
2013
|
"contentName": "string.quoted.double.js",
|
2026
|
-
"begin": "\\s
|
2027
|
-
"end": "((\"))|(
|
2014
|
+
"begin": "\\s*+((\"))",
|
2015
|
+
"end": "\\s*+(?:((\"))|(\n))",
|
2028
2016
|
"beginCaptures": {
|
2029
2017
|
"1": {
|
2030
2018
|
"name": "string.quoted.double.js"
|
@@ -2056,11 +2044,11 @@
|
|
2056
2044
|
"patterns": [
|
2057
2045
|
{
|
2058
2046
|
"name": "keyword.control.module.js",
|
2059
|
-
"match": "\\s
|
2047
|
+
"match": "\\s*+(?<!\\.)\\b(import|export|default)\\b"
|
2060
2048
|
},
|
2061
2049
|
{
|
2062
2050
|
"name": "keyword.control.module.reference.js",
|
2063
|
-
"match": "\\s
|
2051
|
+
"match": "\\s*+(?<!\\.)\\b(from|as)\\b"
|
2064
2052
|
}
|
2065
2053
|
]
|
2066
2054
|
},
|
@@ -2069,17 +2057,17 @@
|
|
2069
2057
|
{
|
2070
2058
|
"comment": "e.g. CONSTANT",
|
2071
2059
|
"name": "variable.other.constant.js",
|
2072
|
-
"match": "\\s
|
2060
|
+
"match": "\\s*+[A-Z][_$\\dA-Z]*\\b"
|
2073
2061
|
},
|
2074
2062
|
{
|
2075
2063
|
"comment": "e.g. dollar vars",
|
2076
2064
|
"name": "variable.other.dollar.js",
|
2077
|
-
"match": "\\s
|
2065
|
+
"match": "\\s*+\\$[$\\w]*"
|
2078
2066
|
},
|
2079
2067
|
{
|
2080
2068
|
"comment": "e.g. Class.property",
|
2081
2069
|
"name": "meta.property.class.js",
|
2082
|
-
"match": "\\s
|
2070
|
+
"match": "\\s*+\\b([A-Z][$\\w]*)\\s*+(\\.)([_$a-zA-Z][$\\w]*)",
|
2083
2071
|
"captures": {
|
2084
2072
|
"1": {
|
2085
2073
|
"name": "variable.other.class.js"
|
@@ -2095,7 +2083,7 @@
|
|
2095
2083
|
{
|
2096
2084
|
"comment": "e.g. obj.property",
|
2097
2085
|
"name": "variable.other.object.js",
|
2098
|
-
"match": "\\s
|
2086
|
+
"match": "\\s*+(?<!\\.)[_$a-zA-Z][$\\w]*\\s*+(?=[\\[\\.])",
|
2099
2087
|
"captures": {
|
2100
2088
|
"1": {
|
2101
2089
|
"name": "variable.other.object.js"
|
@@ -2105,7 +2093,7 @@
|
|
2105
2093
|
{
|
2106
2094
|
"comment": "e.g. obj.property",
|
2107
2095
|
"name": "meta.property.object.js",
|
2108
|
-
"match": "\\s
|
2096
|
+
"match": "\\s*+(?<=\\.)\\s*+[_$a-zA-Z][$\\w]*",
|
2109
2097
|
"captures": {
|
2110
2098
|
"0": {
|
2111
2099
|
"name": "variable.other.property.js"
|
@@ -2114,7 +2102,7 @@
|
|
2114
2102
|
},
|
2115
2103
|
{
|
2116
2104
|
"name": "variable.other.readwrite.js",
|
2117
|
-
"match": "\\s
|
2105
|
+
"match": "\\s*+[_$a-zA-Z][$\\w]*"
|
2118
2106
|
}
|
2119
2107
|
]
|
2120
2108
|
},
|
@@ -2123,7 +2111,7 @@
|
|
2123
2111
|
{
|
2124
2112
|
"comment": "e.g. Sound.prototype",
|
2125
2113
|
"name": "meta.prototype.access.js",
|
2126
|
-
"match": "\\s
|
2114
|
+
"match": "\\s*+([_$a-zA-Z][$\\w]*)(\\.)(prototype)\\b",
|
2127
2115
|
"captures": {
|
2128
2116
|
"1": {
|
2129
2117
|
"name": "entity.name.class.js"
|
@@ -2139,7 +2127,7 @@
|
|
2139
2127
|
{
|
2140
2128
|
"comment": "e.g. Sound.prototype = { }",
|
2141
2129
|
"name": "meta.prototype.declaration.js",
|
2142
|
-
"match": "\\s
|
2130
|
+
"match": "\\s*+([_$a-zA-Z][$\\w]*)(\\.)(prototype)\\s*+=\\s*+",
|
2143
2131
|
"captures": {
|
2144
2132
|
"1": {
|
2145
2133
|
"name": "entity.name.class.js"
|
@@ -2159,7 +2147,7 @@
|
|
2159
2147
|
{
|
2160
2148
|
"comment": "https://github.com/wycats/javascript-decorators",
|
2161
2149
|
"name": "tag.decorator.js",
|
2162
|
-
"match": "\\s
|
2150
|
+
"match": "\\s*+(?<!@)(@)([_$a-zA-Z][$\\w]*)\\b",
|
2163
2151
|
"captures": {
|
2164
2152
|
"1": {
|
2165
2153
|
"name": "punctuation.definition.tag.js"
|
@@ -2175,7 +2163,7 @@
|
|
2175
2163
|
"comment": "Avoid < operator expressions as best we can using Zertosh's regex",
|
2176
2164
|
"patterns": [
|
2177
2165
|
{
|
2178
|
-
"begin": "(?<=\\(|\\{|\\[|,|&&|\\|\\||\\?|:|=|=>|\\Wreturn|^return|^)\\s
|
2166
|
+
"begin": "(?<=\\(|\\{|\\[|,|&&|\\|\\||\\?|:|=|=>|\\Wreturn|^return|\\Wdefault|^)\\s*+(?=<[_$a-zA-Z])",
|
2179
2167
|
"end": "(?=.)",
|
2180
2168
|
"applyEndPatternLast": 1,
|
2181
2169
|
"patterns": [
|
@@ -2191,7 +2179,7 @@
|
|
2191
2179
|
{
|
2192
2180
|
"comment": "Tags that end > are trapped in #jsx-tag-termination",
|
2193
2181
|
"name": "meta.tag.jsx",
|
2194
|
-
"begin": "\\s
|
2182
|
+
"begin": "\\s*+(<)([$_\\p{L}](?:[$.:\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}-](?<!\\.\\.))*+)(?=[/>\\s])(?<![\\.:])",
|
2195
2183
|
"end": "\\s*(?<=</)(\\2)(>)|(/>)|((?<=</)[\\S ]*?)>",
|
2196
2184
|
"beginCaptures": {
|
2197
2185
|
"1": {
|
@@ -2410,13 +2398,16 @@
|
|
2410
2398
|
},
|
2411
2399
|
{
|
2412
2400
|
"comment": "Entity with & and invalid name",
|
2413
|
-
"match": "&\\
|
2401
|
+
"match": "&\\s*+;",
|
2414
2402
|
"name": "invalid.illegal.bad-ampersand.jsx"
|
2415
2403
|
}
|
2416
2404
|
]
|
2417
2405
|
},
|
2418
2406
|
"flowtype": {
|
2419
2407
|
"patterns": [
|
2408
|
+
{
|
2409
|
+
"include": "#comments"
|
2410
|
+
},
|
2420
2411
|
{
|
2421
2412
|
"include": "#flowtype-polymorphs"
|
2422
2413
|
},
|
@@ -2432,7 +2423,7 @@
|
|
2432
2423
|
"patterns": [
|
2433
2424
|
{
|
2434
2425
|
"comment": "maybe an issue if a object literal is returned and the start of func block isn't on same line!",
|
2435
|
-
"begin": "(?<=\\))\\s
|
2426
|
+
"begin": "(?<=\\))\\s*+(:)",
|
2436
2427
|
"end": "(?=.)",
|
2437
2428
|
"applyEndPatternLast": 1,
|
2438
2429
|
"beginCaptures": {
|
@@ -2452,7 +2443,7 @@
|
|
2452
2443
|
"patterns": [
|
2453
2444
|
{
|
2454
2445
|
"comment": "name of variable spread var with flowtype :",
|
2455
|
-
"match": "\\s
|
2446
|
+
"match": "\\s*+((?<!\\.)\\.\\.\\.)?([$_\\p{L}](?:[$.\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}])*+)\\s*+(\\??)\\s*+(?=:|=>)",
|
2456
2447
|
"captures": {
|
2457
2448
|
"1": {
|
2458
2449
|
"name": "keyword.operator.spread.js"
|
@@ -2474,7 +2465,7 @@
|
|
2474
2465
|
"comment": "use this pattern to colour code the variable part correctly",
|
2475
2466
|
"patterns": [
|
2476
2467
|
{
|
2477
|
-
"begin": "\\s
|
2468
|
+
"begin": "\\s*+{",
|
2478
2469
|
"end": "\\s*}",
|
2479
2470
|
"patterns": [
|
2480
2471
|
{
|
@@ -2483,7 +2474,7 @@
|
|
2483
2474
|
]
|
2484
2475
|
},
|
2485
2476
|
{
|
2486
|
-
"begin": "\\s
|
2477
|
+
"begin": "\\s*+\\[",
|
2487
2478
|
"end": "\\s*\\]",
|
2488
2479
|
"patterns": [
|
2489
2480
|
{
|
@@ -2493,7 +2484,7 @@
|
|
2493
2484
|
},
|
2494
2485
|
{
|
2495
2486
|
"comment": "string as destructor target",
|
2496
|
-
"match": "\\s
|
2487
|
+
"match": "\\s*+((['\\\"]).*?\\k<-1>(?<!\\\\.))\\s*+(:)\\s*+(([$_\\p{L}](?:[$.\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}])*+))",
|
2497
2488
|
"captures": {
|
2498
2489
|
"1": {
|
2499
2490
|
"name": "string.quoted.js"
|
@@ -2508,7 +2499,7 @@
|
|
2508
2499
|
},
|
2509
2500
|
{
|
2510
2501
|
"comment": "prop name : var name as destructor target",
|
2511
|
-
"match": "\\s
|
2502
|
+
"match": "\\s*+([$_\\p{L}](?:[$.\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}])*+)\\s*+(:)\\s*+(([$_\\p{L}](?:[$.\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}])*+))",
|
2512
2503
|
"captures": {
|
2513
2504
|
"1": {
|
2514
2505
|
"name": "string.unquoted.js"
|
@@ -2523,7 +2514,7 @@
|
|
2523
2514
|
},
|
2524
2515
|
{
|
2525
2516
|
"comment": "var name as destructor target",
|
2526
|
-
"match": "\\s
|
2517
|
+
"match": "\\s*+((?<!\\.)\\.\\.\\.)?([$_\\p{L}](?:[$.\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}])*+)",
|
2527
2518
|
"captures": {
|
2528
2519
|
"1": {
|
2529
2520
|
"name": "keyword.operator.spread.js"
|
@@ -2546,11 +2537,11 @@
|
|
2546
2537
|
{
|
2547
2538
|
"comment": "flowtype optional arg/parameter e.g. protocol? : string",
|
2548
2539
|
"name": "punctuation.type.flowtype",
|
2549
|
-
"match": "\\?(?=\\s
|
2540
|
+
"match": "\\?(?=\\s*+:)"
|
2550
2541
|
},
|
2551
2542
|
{
|
2552
2543
|
"comment": "typed entity :",
|
2553
|
-
"begin": "\\s
|
2544
|
+
"begin": "\\s*+(:)",
|
2554
2545
|
"end": "(?=.)",
|
2555
2546
|
"applyEndPatternLast": 1,
|
2556
2547
|
"beginCaptures": {
|
@@ -2569,10 +2560,10 @@
|
|
2569
2560
|
},
|
2570
2561
|
{
|
2571
2562
|
"comment": "An Iterator prefix?",
|
2572
|
-
"match": "\\s
|
2563
|
+
"match": "\\s*+@@"
|
2573
2564
|
},
|
2574
2565
|
{
|
2575
|
-
"match": "\\s
|
2566
|
+
"match": "\\s*+(=>)",
|
2576
2567
|
"captures": {
|
2577
2568
|
"1": {
|
2578
2569
|
"name": "storage.type.function.arrow.js"
|
@@ -2594,7 +2585,7 @@
|
|
2594
2585
|
"patterns": [
|
2595
2586
|
{
|
2596
2587
|
"comment": "call back with a form ) => type",
|
2597
|
-
"begin": "(?<=\\))\\s
|
2588
|
+
"begin": "(?<=\\))\\s*+(=>)",
|
2598
2589
|
"end": "(?=.)",
|
2599
2590
|
"applyEndPatternLast": 1,
|
2600
2591
|
"beginCaptures": {
|
@@ -2610,7 +2601,7 @@
|
|
2610
2601
|
},
|
2611
2602
|
{
|
2612
2603
|
"comment": "some form of default assignment for func args",
|
2613
|
-
"begin": "\\s
|
2604
|
+
"begin": "\\s*+=(?!>|=|==)",
|
2614
2605
|
"end": "\\s*(?=,|;|\\))",
|
2615
2606
|
"beginCaptures": {
|
2616
2607
|
"0": {
|
@@ -2630,15 +2621,15 @@
|
|
2630
2621
|
{
|
2631
2622
|
"comment": "Maybe types",
|
2632
2623
|
"name": "keyword.operator.maybe.flowtype",
|
2633
|
-
"match": "\\s
|
2624
|
+
"match": "\\s*+\\?"
|
2634
2625
|
},
|
2635
2626
|
{
|
2636
2627
|
"name": "keyword.operator.flowtype",
|
2637
|
-
"match": "\\s
|
2628
|
+
"match": "\\s*+\\btypeof\\b\\s*+"
|
2638
2629
|
},
|
2639
2630
|
{
|
2640
2631
|
"comment": "primitive flowtypes",
|
2641
|
-
"match": "\\s
|
2632
|
+
"match": "\\s*+\\b((?>any|boolean|mixed|number|string|void))\\b",
|
2642
2633
|
"captures": {
|
2643
2634
|
"1": {
|
2644
2635
|
"name": "support.type.builtin.primitive.flowtype"
|
@@ -2647,7 +2638,7 @@
|
|
2647
2638
|
},
|
2648
2639
|
{
|
2649
2640
|
"comment": "Built-in Class Types",
|
2650
|
-
"match": "\\s
|
2641
|
+
"match": "\\s*+\\b((?>ArrayBuffer|ArrayBufferView|Boolean|Date|DataView|Error|EvalError|Float32Array|Float64Array|Function|Int8Array|Int16Array|Int32Array|JSON|Math|Number|Object|RangeError|ReferenceError|RegExp|String|Symbol|TypeError|Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray))\\b",
|
2651
2642
|
"captures": {
|
2652
2643
|
"1": {
|
2653
2644
|
"name": "support.type.builtin.class.flowtype"
|
@@ -2659,7 +2650,7 @@
|
|
2659
2650
|
},
|
2660
2651
|
{
|
2661
2652
|
"comment": "custom Class Types e.g. Abc avoid Abc(",
|
2662
|
-
"match": "\\s
|
2653
|
+
"match": "\\s*+([$_[\\p{Lu}\\p{Lt}\\p{Lm}\\p{Lo}]][$.\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}]*+)(?!\\s*+\\()",
|
2663
2654
|
"captures": {
|
2664
2655
|
"1": {
|
2665
2656
|
"name": "support.type.class.flowtype"
|
@@ -2668,7 +2659,7 @@
|
|
2668
2659
|
},
|
2669
2660
|
{
|
2670
2661
|
"comment": "custom primitive/var Types e.g. abc avoid abc(",
|
2671
|
-
"match": "\\s
|
2662
|
+
"match": "\\s*+([$_\\p{L}][$.\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}]*+)(?!\\s*+\\()",
|
2672
2663
|
"captures": {
|
2673
2664
|
"1": {
|
2674
2665
|
"name": "support.type.primitive.flowtype"
|
@@ -2678,17 +2669,17 @@
|
|
2678
2669
|
{
|
2679
2670
|
"comment": "Type Unions |",
|
2680
2671
|
"name": "kewyword.operator.union.flowtype",
|
2681
|
-
"match": "\\s
|
2672
|
+
"match": "\\s*+\\|"
|
2682
2673
|
},
|
2683
2674
|
{
|
2684
2675
|
"comment": "intersection of types &",
|
2685
2676
|
"name": "kewyword.operator.intersection.flowtype",
|
2686
|
-
"match": "\\s
|
2677
|
+
"match": "\\s*+\\&"
|
2687
2678
|
},
|
2688
2679
|
{
|
2689
2680
|
"comment": "as per React declares in flowtype github",
|
2690
2681
|
"name": "kewyword.operator.existential.flowtype",
|
2691
|
-
"match": "\\s
|
2682
|
+
"match": "\\s*+\\*"
|
2692
2683
|
},
|
2693
2684
|
{
|
2694
2685
|
"include": "#literal-string"
|
@@ -2717,7 +2708,7 @@
|
|
2717
2708
|
"patterns": [
|
2718
2709
|
{
|
2719
2710
|
"comment": "Get parameters within a function/method call",
|
2720
|
-
"begin": "\\s
|
2711
|
+
"begin": "\\s*+(\\()",
|
2721
2712
|
"end": "\\s*(\\))",
|
2722
2713
|
"beginCaptures": {
|
2723
2714
|
"1": {
|
@@ -2742,7 +2733,7 @@
|
|
2742
2733
|
"patterns": [
|
2743
2734
|
{
|
2744
2735
|
"comment": "Built-in Class Types with elements of type <T>",
|
2745
|
-
"begin": "\\s
|
2736
|
+
"begin": "\\s*+\\b((?>Array|Class|Map|Promise|Set|WeakMap|WeakSet))\\s*+(<)",
|
2746
2737
|
"end": "\\s*(>)",
|
2747
2738
|
"beginCaptures": {
|
2748
2739
|
"1": {
|
@@ -2759,11 +2750,11 @@
|
|
2759
2750
|
},
|
2760
2751
|
"patterns": [
|
2761
2752
|
{
|
2762
|
-
"match": "\\s
|
2753
|
+
"match": "\\s*+,",
|
2763
2754
|
"name": "punctuation.type.separator.flowtype"
|
2764
2755
|
},
|
2765
2756
|
{
|
2766
|
-
"match": "\\s
|
2757
|
+
"match": "\\s*+:",
|
2767
2758
|
"name": "punctuation.type.separator.flowtype"
|
2768
2759
|
},
|
2769
2760
|
{
|
@@ -2773,7 +2764,7 @@
|
|
2773
2764
|
},
|
2774
2765
|
{
|
2775
2766
|
"comment": "just the polymorph bit like this <K,V>(arg,arg)",
|
2776
|
-
"begin": "\\s
|
2767
|
+
"begin": "\\s*+(<)(?!<)",
|
2777
2768
|
"end": "\\s*(>)",
|
2778
2769
|
"beginCaptures": {
|
2779
2770
|
"1": {
|
@@ -2787,11 +2778,11 @@
|
|
2787
2778
|
},
|
2788
2779
|
"patterns": [
|
2789
2780
|
{
|
2790
|
-
"match": "\\s
|
2781
|
+
"match": "\\s*+,",
|
2791
2782
|
"name": "punctuation.type.separator.flowtype"
|
2792
2783
|
},
|
2793
2784
|
{
|
2794
|
-
"match": "\\s
|
2785
|
+
"match": "\\s*+:",
|
2795
2786
|
"name": "punctuation.type.separator.flowtype"
|
2796
2787
|
},
|
2797
2788
|
{
|
@@ -2803,7 +2794,7 @@
|
|
2803
2794
|
},
|
2804
2795
|
"flowtype-parse-objects": {
|
2805
2796
|
"comment": "object literal flowtype preceded by either : | & ? symbols",
|
2806
|
-
"begin": "(?<=:|\\||&|\\?)\\s
|
2797
|
+
"begin": "(?<=:|\\||&|\\?)\\s*+(\\{)",
|
2807
2798
|
"end": "\\s*(\\})",
|
2808
2799
|
"applyEndPatternLast": 1,
|
2809
2800
|
"beginCaptures": {
|
@@ -2826,7 +2817,7 @@
|
|
2826
2817
|
"patterns": [
|
2827
2818
|
{
|
2828
2819
|
"comment": "name of property which can be a string",
|
2829
|
-
"match": "\\s
|
2820
|
+
"match": "\\s*+(((\"|').*?(?<=[^\\\\])\\k<-1>)|([$_\\p{L}](?:[$.\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}])*+))\\s*+(\\??)\\s*+(?=:)",
|
2830
2821
|
"captures": {
|
2831
2822
|
"1": {
|
2832
2823
|
"name": "variable.other.property.flowtype"
|
@@ -2843,7 +2834,7 @@
|
|
2843
2834
|
},
|
2844
2835
|
"flowtype-parse-array": {
|
2845
2836
|
"comment": "arrays such as [name: string, dob: Date]",
|
2846
|
-
"begin": "\\s
|
2837
|
+
"begin": "\\s*+(\\[)",
|
2847
2838
|
"end": "\\s*(\\])",
|
2848
2839
|
"beginCaptures": {
|
2849
2840
|
"1": {
|
@@ -2865,7 +2856,7 @@
|
|
2865
2856
|
"patterns": [
|
2866
2857
|
{
|
2867
2858
|
"comment": "import for types",
|
2868
|
-
"match": "\\s
|
2859
|
+
"match": "\\s*+(?<!\\.)\\b(import)\\b\\s*+(type)\\b",
|
2869
2860
|
"captures": {
|
2870
2861
|
"1": {
|
2871
2862
|
"name": "keyword.control.module.js"
|
@@ -2877,7 +2868,7 @@
|
|
2877
2868
|
},
|
2878
2869
|
{
|
2879
2870
|
"comment": "type aliases for export but avoid type instaceof or type in operators",
|
2880
|
-
"begin": "\\s
|
2871
|
+
"begin": "\\s*+\\b(type)\\b\\s+(?!(instanceof|in)\\b)(?=[$_\\p{L}])",
|
2881
2872
|
"end": "\\s*;|\\n",
|
2882
2873
|
"beginCaptures": {
|
2883
2874
|
"1": {
|
@@ -2891,10 +2882,10 @@
|
|
2891
2882
|
},
|
2892
2883
|
"patterns": [
|
2893
2884
|
{
|
2894
|
-
"match": "\\s
|
2885
|
+
"match": "\\s*+="
|
2895
2886
|
},
|
2896
2887
|
{
|
2897
|
-
"begin": "\\s
|
2888
|
+
"begin": "\\s*+{",
|
2898
2889
|
"end": "\\s*}",
|
2899
2890
|
"applyEndPatternLast": 1,
|
2900
2891
|
"beginCaptures": {
|
@@ -2942,7 +2933,7 @@
|
|
2942
2933
|
"patterns": [
|
2943
2934
|
{
|
2944
2935
|
"comment": "find declare module and declare class defs",
|
2945
|
-
"begin": "\\s
|
2936
|
+
"begin": "\\s*+\\b(interface)\\s+(?=[$_\\p{L}])",
|
2946
2937
|
"end": "\\s*(?:(;)|\\n|(}))",
|
2947
2938
|
"applyEndPatternLast": 1,
|
2948
2939
|
"beginCaptures": {
|
@@ -2963,7 +2954,7 @@
|
|
2963
2954
|
"include": "#comments"
|
2964
2955
|
},
|
2965
2956
|
{
|
2966
|
-
"match": "\\s
|
2957
|
+
"match": "\\s*+\\b(extends)\\b\\s*+",
|
2967
2958
|
"captures": {
|
2968
2959
|
"1": {
|
2969
2960
|
"name": "storage.type.extends.flowtype"
|
@@ -2977,7 +2968,7 @@
|
|
2977
2968
|
"include": "#flowtype-interface-name"
|
2978
2969
|
},
|
2979
2970
|
{
|
2980
|
-
"begin": "\\s
|
2971
|
+
"begin": "\\s*+{",
|
2981
2972
|
"end": "\\s*(?=})",
|
2982
2973
|
"contentName": "meta.class.body.js",
|
2983
2974
|
"beginCaptures": {
|
@@ -2987,7 +2978,7 @@
|
|
2987
2978
|
},
|
2988
2979
|
"patterns": [
|
2989
2980
|
{
|
2990
|
-
"match": "\\s
|
2981
|
+
"match": "\\s*+\\b(?<!\\.)static\\b(?!\\.)",
|
2991
2982
|
"name": "storage.modifier.js"
|
2992
2983
|
},
|
2993
2984
|
{
|
@@ -3009,7 +3000,7 @@
|
|
3009
3000
|
]
|
3010
3001
|
},
|
3011
3002
|
"flowtype-function-name": {
|
3012
|
-
"match": "\\s
|
3003
|
+
"match": "\\s*+(\\bstatic\\b)?\\s*+([$_\\p{L}][$.\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}]*)?\\s*+(?!:)(?=\\(|<.*\\()",
|
3013
3004
|
"captures": {
|
3014
3005
|
"1": {
|
3015
3006
|
"name": "storage.modifier.static.js"
|
@@ -3021,18 +3012,18 @@
|
|
3021
3012
|
},
|
3022
3013
|
"flowtype-class-name": {
|
3023
3014
|
"comment": "look for classes names but dont assume uppercase start char",
|
3024
|
-
"match": "(?<!\\.)\\s
|
3015
|
+
"match": "(?<!\\.)\\s*+([$_\\p{L}](?:[$\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}])*+)",
|
3025
3016
|
"name": "entity.name.class.js"
|
3026
3017
|
},
|
3027
3018
|
"flowtype-interface-name": {
|
3028
3019
|
"comment": "look for interface names but dont assume uppercase start char",
|
3029
|
-
"match": "(?<!\\.)\\s
|
3020
|
+
"match": "(?<!\\.)\\s*+([$_\\p{L}](?:[$\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}])*+)",
|
3030
3021
|
"name": "support.type.class.interface.js"
|
3031
3022
|
},
|
3032
3023
|
"flowtype-declare": {
|
3033
3024
|
"patterns": [
|
3034
3025
|
{
|
3035
|
-
"begin": "\\s
|
3026
|
+
"begin": "\\s*+\\b(declare)\\s+(?=(class|function|module|var))\\b",
|
3036
3027
|
"end": "(?=.)",
|
3037
3028
|
"applyEndPatternLast": 1,
|
3038
3029
|
"beginCaptures": {
|
@@ -3058,13 +3049,13 @@
|
|
3058
3049
|
]
|
3059
3050
|
},
|
3060
3051
|
"flowtype-declare-modules": {
|
3061
|
-
"match": "\\s
|
3052
|
+
"match": "\\s*+\\bmodule\\b\\s+",
|
3062
3053
|
"name": "support.type.object.module.js"
|
3063
3054
|
},
|
3064
3055
|
"flowtype-declare-classes": {
|
3065
3056
|
"patterns": [
|
3066
3057
|
{
|
3067
|
-
"begin": "\\s
|
3058
|
+
"begin": "\\s*+\\b(class)\\s+",
|
3068
3059
|
"end": "\\s*(})",
|
3069
3060
|
"applyEndPatternLast": 1,
|
3070
3061
|
"beginCaptures": {
|
@@ -3079,7 +3070,7 @@
|
|
3079
3070
|
},
|
3080
3071
|
"patterns": [
|
3081
3072
|
{
|
3082
|
-
"match": "\\s
|
3073
|
+
"match": "\\s*+\\b(extends|mixins)\\b\\s*+",
|
3083
3074
|
"captures": {
|
3084
3075
|
"1": {
|
3085
3076
|
"name": "storage.type.extends.flowtype"
|
@@ -3097,7 +3088,7 @@
|
|
3097
3088
|
},
|
3098
3089
|
"patterns": [
|
3099
3090
|
{
|
3100
|
-
"match": "\\s
|
3091
|
+
"match": "\\s*+\\b(?<!\\.)static\\b(?!\\.)",
|
3101
3092
|
"name": "storage.modifier.js"
|
3102
3093
|
},
|
3103
3094
|
{
|
@@ -3130,7 +3121,7 @@
|
|
3130
3121
|
"flowtype-declare-function": {
|
3131
3122
|
"patterns": [
|
3132
3123
|
{
|
3133
|
-
"begin": "\\s
|
3124
|
+
"begin": "\\s*+\\b(function)\\s+",
|
3134
3125
|
"end": "\\s*(;)",
|
3135
3126
|
"applyEndPatternLast": 1,
|
3136
3127
|
"beginCaptures": {
|
@@ -3152,7 +3143,7 @@
|
|
3152
3143
|
"flowtype-declare-vars": {
|
3153
3144
|
"patterns": [
|
3154
3145
|
{
|
3155
|
-
"begin": "\\s
|
3146
|
+
"begin": "\\s*+\\b(var)\\s+",
|
3156
3147
|
"end": "\\s*(?=.)",
|
3157
3148
|
"applyEndPatternLast": 1,
|
3158
3149
|
"beginCaptures": {
|
@@ -3171,8 +3162,8 @@
|
|
3171
3162
|
"flowtype-typecast": {
|
3172
3163
|
"patterns": [
|
3173
3164
|
{
|
3174
|
-
"begin": "\\s
|
3175
|
-
"end": "(?=\\s
|
3165
|
+
"begin": "\\s*+:",
|
3166
|
+
"end": "(?=\\s*+\\))",
|
3176
3167
|
"patterns": [
|
3177
3168
|
{
|
3178
3169
|
"include": "#flowtype-parse-types"
|
@@ -3180,6 +3171,20 @@
|
|
3180
3171
|
]
|
3181
3172
|
}
|
3182
3173
|
]
|
3174
|
+
},
|
3175
|
+
"miscellaneous": {
|
3176
|
+
"comment": "trap miscellaneous stuff",
|
3177
|
+
"patterns": [
|
3178
|
+
{
|
3179
|
+
"comment": "match arrow func symbol when it appears by itself",
|
3180
|
+
"match": "\\s*(=>)",
|
3181
|
+
"captures": {
|
3182
|
+
"1": {
|
3183
|
+
"name": "storage.type.function.arrow.js"
|
3184
|
+
}
|
3185
|
+
}
|
3186
|
+
}
|
3187
|
+
]
|
3183
3188
|
}
|
3184
3189
|
}
|
3185
3190
|
}
|