github-linguist 4.8.6 → 4.8.7

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.
@@ -687,6 +687,27 @@
687
687
  }
688
688
  ]
689
689
  },
690
+ {
691
+ "begin": "^\\s*([`~]{3,})\\s*(?i:(pycon))\\s*$",
692
+ "beginCaptures": {
693
+ "0": {
694
+ "name": "support.gfm"
695
+ }
696
+ },
697
+ "end": "^\\s*\\1\\s*$",
698
+ "endCaptures": {
699
+ "0": {
700
+ "name": "support.gfm"
701
+ }
702
+ },
703
+ "name": "markup.code.python.console.gfm",
704
+ "contentName": "source.embedded.python.console",
705
+ "patterns": [
706
+ {
707
+ "include": "text.python.console"
708
+ }
709
+ ]
710
+ },
690
711
  {
691
712
  "begin": "^\\s*([`~]{3,})\\s*(?i:(c))\\s*$",
692
713
  "beginCaptures": {
@@ -1663,7 +1663,7 @@
1663
1663
  "docblock": {
1664
1664
  "patterns": [
1665
1665
  {
1666
- "match": "(?<!\\w)@(abstract|access|alias|augments|author|async|attribute|arg|argument|beta|borrows|bubbes|callback|class|classdesc|config|const|constant|constructs|constructor|copyright|chainable|default|defaultvalue|deprecated|desc|description|enum|emits|event|example|exports|external|extends|extension|extensionfor|extension_for|for|file|fileoverview|fires|final|function|global|host|ignore|implements|inheritdoc|inner|instance|interface|kind|lends|license|listens|main|member|memberof|method|mixex|mixin(?:s|)|module|name|namespace|override|overview|param|private|prop|property|protected|readonly|readOnly|requires|required|return|returns|see|since|static|summary|submodule|this|throws|todo|tutorial|type|typedef|var|variation|version|virtual|uses|writeOnce)\\b",
1666
+ "match": "(?<!\\w)@(abstract|access|alias|augments|author|async|attribute|arg|argument|beta|borrows|bubbes|callback|class|classdesc|config|const|constant|constructs|constructor|copyright|chainable|default|defaultvalue|deprecated|desc|description|enum|emits|event|example|exports|external|extends|extension|extensionfor|extension_for|for|file|fileoverview|fires|final|function|global|host|ignore|implements|inheritdoc|inner|instance|interface|kind|lends|license|listens|main|member|memberof|method|mixex|mixin(?:s|)|module|name|namespace|override|overview|param|private|prop|property|protected|public|readonly|readOnly|requires|required|return|returns|see|since|static|summary|submodule|this|throws|todo|tutorial|type|typedef|var|variation|version|virtual|uses|writeOnce)\\b",
1667
1667
  "name": "storage.type.class.jsdoc"
1668
1668
  },
1669
1669
  {
@@ -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": [
@@ -147,7 +147,7 @@
147
147
  "comment": "so set at arbitary 1000 chars to avoid parsing minified files",
148
148
  "patterns": [
149
149
  {
150
- "match": "^(?:).{1000,}"
150
+ "match": "^.{1000,}"
151
151
  }
152
152
  ]
153
153
  },
@@ -157,7 +157,7 @@
157
157
  "comment": "e.g. play: function(arg1, arg2) { }",
158
158
  "name": "meta.function.json.js",
159
159
  "begin": "(?<=^|{|,)\\s*+([_$a-zA-Z][$\\w]*)\\s*+(:)\\s*+(?:(async)\\s+)?\\s*+((?<!\\.)\\bfunction\\b)\\s*+(?:(\\*)\\s*)?\\s*(?=\\(|<)",
160
- "end": "(?=\\{)",
160
+ "end": "(?={)",
161
161
  "applyEndPatternLast": 1,
162
162
  "beginCaptures": {
163
163
  "1": {
@@ -185,8 +185,8 @@
185
185
  {
186
186
  "comment": "e.g. 'play': function(arg1, arg2) { }",
187
187
  "name": "meta.function.json.js",
188
- "begin": "(?<=^|{|,)\\s*+(('|\\\")([^\"']*)(\\k<-3>))\\s*+(:)\\s*+(async)?\\s*+((?<!\\.)\\bfunction\\b)\\s*(\\*\\s*)?\\s*(?=\\(|<)",
189
- "end": "(?=\\{)",
188
+ "begin": "(?<=^|{|,)\\s*+(('|\")([^\"']*)(\\k<-3>))\\s*+(:)\\s*+(async)?\\s*+((?<!\\.)\\bfunction\\b)\\s*(\\*\\s*)?\\s*(?=\\(|<)",
189
+ "end": "(?={)",
190
190
  "applyEndPatternLast": 1,
191
191
  "beginCaptures": {
192
192
  "1": {
@@ -227,7 +227,7 @@
227
227
  {
228
228
  "comment": "e.g. play: async <T>(args) => { }",
229
229
  "name": "meta.function.json.arrow.js",
230
- "begin": "(?<=^|{|,)\\s*+(\\b[_$a-zA-Z][$\\w]*)\\s*+(:)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\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*=>)",
230
+ "begin": "(?<=^|{|,)\\s*+(\\b[_$a-zA-Z][$\\w]*)\\s*+(:)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\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*=>)",
231
231
  "end": "\\s*(=>)",
232
232
  "beginCaptures": {
233
233
  "1": {
@@ -254,7 +254,7 @@
254
254
  {
255
255
  "comment": "e.g. play: arg => { }",
256
256
  "name": "meta.function.json.arrow.js",
257
- "begin": "(?<=^|{|,)\\s*+(\\b[_$a-zA-Z][$\\w]*)\\s*+(:)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+([_$a-zA-Z][$\\w]*)\\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*=>)",
257
+ "begin": "(?<=^|{|,)\\s*+(\\b[_$a-zA-Z][$\\w]*)\\s*+(:)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+([_$a-zA-Z][$\\w]*)\\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*=>)",
258
258
  "end": "\\s*(=>)",
259
259
  "beginCaptures": {
260
260
  "1": {
@@ -284,7 +284,7 @@
284
284
  {
285
285
  "comment": "e.g. 'play': (args) => { }",
286
286
  "name": "meta.function.json.arrow.js",
287
- "begin": "(?<=^|{|,)\\s*+(('|\\\")([^\"']*)(\\k<-3>))\\s*(:)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\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*=>)",
287
+ "begin": "(?<=^|{|,)\\s*+(('|\")([^\"']*)(\\k<-3>))\\s*(:)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\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*=>)",
288
288
  "end": "\\s*(=>)",
289
289
  "applyEndPatternLast": 1,
290
290
  "endCaptures": {
@@ -321,7 +321,7 @@
321
321
  {
322
322
  "comment": "e.g. 'play': arg => { }",
323
323
  "name": "meta.function.json.arrow.js",
324
- "begin": "(?<=^|{|,)\\s*+(('|\\\")([^\"']*)(\\k<-3>))\\s*+(:)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+([_$a-zA-Z][$\\w]*)\\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*=>)",
324
+ "begin": "(?<=^|{|,)\\s*+(('|\")([^\"']*)(\\k<-3>))\\s*+(:)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+([_$a-zA-Z][$\\w]*)\\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*=>)",
325
325
  "end": "\\s*(=>)",
326
326
  "beginCaptures": {
327
327
  "1": {
@@ -363,7 +363,7 @@
363
363
  "patterns": [
364
364
  {
365
365
  "comment": "string as a property name",
366
- "match": "\\s*+(?<!\\.|\\?|\\?\\s|\\?\\s\\s)(((\\\")(\\\\.|[^\\\\\"])*(\\\"))|((')(\\\\.|[^\\\\'])*(')))\\s*+(:)",
366
+ "match": "\\s*+(?<!\\.|\\?|\\?\\s|\\?\\s\\s)(((\")(\\\\.|[^\\\\\"])*(\"))|((')(\\\\.|[^\\\\'])*(')))\\s*+(:)",
367
367
  "captures": {
368
368
  "1": {
369
369
  "name": "constant.other.object.key.js"
@@ -525,7 +525,7 @@
525
525
  "include": "#round-brackets"
526
526
  },
527
527
  {
528
- "begin": "\\s*+\\{",
528
+ "begin": "\\s*+{",
529
529
  "end": "\\s*(?=})",
530
530
  "beginCaptures": {
531
531
  "0": {
@@ -646,7 +646,7 @@
646
646
  "curly-brackets": {
647
647
  "patterns": [
648
648
  {
649
- "begin": "\\s*+\\{",
649
+ "begin": "\\s*+{",
650
650
  "end": "\\s*\\}",
651
651
  "endCaptures": {
652
652
  "0": {
@@ -808,7 +808,7 @@
808
808
  "patterns": [
809
809
  {
810
810
  "name": "punctuation.terminator.statement.js",
811
- "match": "\\s*+\\;"
811
+ "match": "\\s*+;"
812
812
  }
813
813
  ]
814
814
  },
@@ -824,7 +824,7 @@
824
824
  "patterns": [
825
825
  {
826
826
  "begin": "\\s*+(?<!\\.)\\b(const|let|var)\\b",
827
- "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
+ "end": "\\s*(?=;|\\b(if|switch|try|var|let|const|static|function|return|class|do|for|while|debugger|export|import|yield|type|declare|interface)\\b|\\)|})",
828
828
  "beginCaptures": {
829
829
  "1": {
830
830
  "name": "storage.type.js"
@@ -834,7 +834,7 @@
834
834
  {
835
835
  "comment": "other variables",
836
836
  "begin": "\\s*",
837
- "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
+ "end": "\\s*((,)|(?=(;)|\\b(if|switch|try|var|let|const|static|function|return|class|do|for|while|debugger|export|import|yield|type|declare|interface)\\b|\\)|}))",
838
838
  "endCaptures": {
839
839
  "2": {
840
840
  "name": "punctuation.terminator.statement.js"
@@ -856,7 +856,7 @@
856
856
  "comment": "e.g. function play<T>(arg1, arg2) { }",
857
857
  "name": "meta.function.js",
858
858
  "begin": "\\s*+(?:\\b(async)\\b\\s+)?\\s*+(?:(?<=\\.\\.\\.)|(?<!\\.))(\\bfunction\\b)\\s*+(\\*?)\\s*+([_$a-zA-Z][$\\w]*)?\\s*+(?=\\(|<)",
859
- "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
+ "end": "\\s*(?=;|{|\\b(if|switch|try|var|let|const|static|function|return|class|do|for|while|debugger|export|import|yield|type|declare|interface)\\b|\\)|})",
860
860
  "applyEndPatternLast": 1,
861
861
  "beginCaptures": {
862
862
  "1": {
@@ -882,7 +882,7 @@
882
882
  "comment": "e.g. play = function(arg1, arg2) { }",
883
883
  "name": "meta.function.js",
884
884
  "begin": "\\s*+(\\b[_$a-zA-Z][$\\w]*)\\s*+(=)\\s*+(?:(async)\\s+)?\\s*+((?<!\\.)\\bfunction\\b)\\s*+(\\*?)\\s*+([_$a-zA-Z][$\\w]*)?\\s*+(?=\\(|<)",
885
- "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
+ "end": "\\s*(?=;|{|\\b(if|switch|try|var|let|const|static|function|return|class|do|for|while|debugger|export|import|yield|type|declare|interface)\\b|\\)|})",
886
886
  "applyEndPatternLast": 1,
887
887
  "beginCaptures": {
888
888
  "1": {
@@ -914,7 +914,7 @@
914
914
  "comment": "e.g. Sound.prototype.play = function(arg1, arg2) { }",
915
915
  "name": "meta.prototype.function.js",
916
916
  "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*+(?=\\(|<)",
917
- "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
+ "end": "\\s*(?=;|{|\\b(if|switch|try|var|let|const|static|function|return|class|do|for|while|debugger|export|import|yield|type|declare|interface)\\b|\\)|})",
918
918
  "applyEndPatternLast": 1,
919
919
  "beginCaptures": {
920
920
  "1": {
@@ -958,7 +958,7 @@
958
958
  "comment": "e.g. Sound.play = function(arg1, arg2) { }",
959
959
  "name": "meta.function.static.js",
960
960
  "begin": "\\s*+(\\b_?[A-Z][$\\w]*)?(\\.)([_$a-zA-Z][$\\w]*)\\s*+(=)\\s*+(?:(async)\\s+)?\\s*+((?<!\\.)\\bfunction\\b)\\s*+(\\*?)\\s*+([_$a-zA-Z][$\\w]*)?\\s*+(?=\\(|<)",
961
- "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
+ "end": "\\s*(?=;|{|\\b(if|switch|try|var|let|const|static|function|return|class|do|for|while|debugger|export|import|yield|type|declare|interface)\\b|\\)|})",
962
962
  "applyEndPatternLast": 1,
963
963
  "beginCaptures": {
964
964
  "1": {
@@ -1078,6 +1078,9 @@
1078
1078
  }
1079
1079
  },
1080
1080
  "patterns": [
1081
+ {
1082
+ "include": "#html-template"
1083
+ },
1081
1084
  {
1082
1085
  "include": "#literal-function-labels"
1083
1086
  },
@@ -1105,6 +1108,9 @@
1105
1108
  },
1106
1109
  "literal-operators": {
1107
1110
  "patterns": [
1111
+ {
1112
+ "include": "#es7-function-bind"
1113
+ },
1108
1114
  {
1109
1115
  "name": "keyword.operator.js",
1110
1116
  "match": "\\s*+(?<!\\.)\\b(delete|in|instanceof|new|of|typeof|void|with)\\b"
@@ -1597,7 +1603,7 @@
1597
1603
  },
1598
1604
  {
1599
1605
  "name": "constant.character.escape",
1600
- "match": "\\\\u((\\{[0-9a-fA-F]+\\})|[0-9a-fA-F]{4})"
1606
+ "match": "\\\\u(({[0-9a-fA-F]+\\})|[0-9a-fA-F]{4})"
1601
1607
  },
1602
1608
  {
1603
1609
  "name": "constant.character.escape",
@@ -1658,7 +1664,7 @@
1658
1664
  {
1659
1665
  "comment": "e.g. (args) => { }",
1660
1666
  "name": "meta.function.arrow.js",
1661
- "begin": "\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\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*=>)",
1667
+ "begin": "\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\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*=>)",
1662
1668
  "end": "\\s*(=>)",
1663
1669
  "applyEndPatternLast": 1,
1664
1670
  "endCaptures": {
@@ -1696,7 +1702,7 @@
1696
1702
  {
1697
1703
  "comment": "e.g. play = (args) => { }",
1698
1704
  "name": "meta.function.arrow.js",
1699
- "begin": "\\s*+(\\b[_$a-zA-Z][$\\w]*)\\s*+(=)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\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*=>)",
1705
+ "begin": "\\s*+(\\b[_$a-zA-Z][$\\w]*)\\s*+(=)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\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*=>)",
1700
1706
  "end": "\\s*(=>)",
1701
1707
  "applyEndPatternLast": 1,
1702
1708
  "beginCaptures": {
@@ -1746,7 +1752,7 @@
1746
1752
  {
1747
1753
  "comment": "Sound.prototype.play = (args) => { }",
1748
1754
  "name": "meta.prototype.function.arrow.js",
1749
- "begin": "\\s*+(\\b[A-Z][$\\w]*)?(\\.)(prototype)(\\.)([_$a-zA-Z][$\\w]*)\\s*+(=)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\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*=>)",
1755
+ "begin": "\\s*+(\\b[A-Z][$\\w]*)?(\\.)(prototype)(\\.)([_$a-zA-Z][$\\w]*)\\s*+(=)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\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*=>)",
1750
1756
  "end": "\\s*(=>)",
1751
1757
  "applyEndPatternLast": 1,
1752
1758
  "beginCaptures": {
@@ -1820,7 +1826,7 @@
1820
1826
  {
1821
1827
  "comment": "e.g. Sound.play = (args) => { }",
1822
1828
  "name": "meta.function.static.arrow.js",
1823
- "begin": "\\s*+(\\b_?[A-Z][$\\w]*)?(\\.)([_$a-zA-Z][$\\w]*)\\s*+(=)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\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*=>)",
1829
+ "begin": "\\s*+(\\b_?[A-Z][$\\w]*)?(\\.)([_$a-zA-Z][$\\w]*)\\s*+(=)\\s*+(\\basync\\b)?\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?\\s*+(\\((?:(?>[^()]+)|\\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*=>)",
1824
1830
  "end": "\\s*(=>)",
1825
1831
  "applyEndPatternLast": 1,
1826
1832
  "beginCaptures": {
@@ -1887,7 +1893,7 @@
1887
1893
  {
1888
1894
  "comment": "e.g. play<T,T>(arg1, arg2): Type<T> { }",
1889
1895
  "name": "meta.function.method.js",
1890
- "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*\\{)",
1896
+ "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*{)",
1891
1897
  "end": "\\s*(?=.)",
1892
1898
  "applyEndPatternLast": 1,
1893
1899
  "beginCaptures": {
@@ -1943,7 +1949,7 @@
1943
1949
  {
1944
1950
  "comment": "e.g. 'play'<T,T>(arg1, arg2): Type<T> { }",
1945
1951
  "name": "meta.function.method.js",
1946
- "begin": "(?<!:)\\s*+(\\bstatic\\b)?\\s*+(\\basync\\b)?\\s*+(\\*?)\\s*+(?<!\\.)(('|\\\")([^\"']*)(\\k<-3>))\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?(\\())",
1952
+ "begin": "(?<!:)\\s*+(\\bstatic\\b)?\\s*+(\\basync\\b)?\\s*+(\\*?)\\s*+(?<!\\.)(('|\")([^\"']*)(\\k<-3>))\\s*+(?=(<(?:(?>[^<>]+)|\\g<-1>)*>)?(\\())",
1947
1953
  "end": "\\s*(?=.)",
1948
1954
  "applyEndPatternLast": 1,
1949
1955
  "beginCaptures": {
@@ -2150,7 +2156,7 @@
2150
2156
  },
2151
2157
  "literal-module-import": {
2152
2158
  "begin": "\\s*+(?<!\\.)\\b(import)(?!\\s*:)\\b",
2153
- "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|\\)|}))",
2159
+ "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|\\)|}))",
2154
2160
  "beginCaptures": {
2155
2161
  "1": {
2156
2162
  "name": "keyword.control.module.js"
@@ -2180,7 +2186,7 @@
2180
2186
  }
2181
2187
  },
2182
2188
  {
2183
- "match": "\\s*\\b(typeof|type)\\b\\s++(?=\\{|[$_a-zA-Z])(?!\\b(instanceof|in|as)\\b|,)",
2189
+ "match": "\\s*\\b(typeof|type)\\b\\s++(?={|[$_a-zA-Z])(?!\\b(instanceof|in|as)\\b|,)",
2184
2190
  "captures": {
2185
2191
  "1": {
2186
2192
  "name": "keyword.other.typedef.flowtype"
@@ -2222,7 +2228,7 @@
2222
2228
  {
2223
2229
  "comment": "export { or export * or export var from module",
2224
2230
  "begin": "\\s*+(?<!\\.)\\b(export)\\b(?=\\s++({|\\*|[$_a-zA-Z][$_\\w]*(\\s++from\\b|\\s*,)))",
2225
- "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|\\)|}))",
2231
+ "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|\\)|}))",
2226
2232
  "beginCaptures": {
2227
2233
  "1": {
2228
2234
  "name": "keyword.control.module.js"
@@ -2298,7 +2304,7 @@
2298
2304
  "literal-module-brackets": {
2299
2305
  "patterns": [
2300
2306
  {
2301
- "begin": "\\s*+(?:(\\{)|(\\[))",
2307
+ "begin": "\\s*+(?:({)|(\\[))",
2302
2308
  "end": "\\s*(?:(\\})|(\\]))",
2303
2309
  "beginCaptures": {
2304
2310
  "1": {
@@ -2447,11 +2453,24 @@
2447
2453
  }
2448
2454
  ]
2449
2455
  },
2456
+ "es7-function-bind": {
2457
+ "patterns": [
2458
+ {
2459
+ "comment": "https://github.com/zenparsing/es-function-bind#examples",
2460
+ "match": "\\s*(::)",
2461
+ "captures": {
2462
+ "1": {
2463
+ "name": "keyword.operator.accessor.js"
2464
+ }
2465
+ }
2466
+ }
2467
+ ]
2468
+ },
2450
2469
  "jsx": {
2451
2470
  "comment": "Avoid < operator expressions as best we can using Zertosh's regex",
2452
2471
  "patterns": [
2453
2472
  {
2454
- "begin": "(?<=\\(|\\{|\\[|,|&&|\\|\\||\\?|:|=|=>|\\Wreturn|^return|\\Wdefault|^)\\s*+(?=<[$_\\p{L}])",
2473
+ "begin": "(?<=\\(|{|\\[|,|&&|\\|\\||\\?|:|=|=>|\\Wreturn|^return|\\Wdefault|^)\\s*+(?=<[$_\\p{L}])",
2455
2474
  "end": "(?=.)",
2456
2475
  "applyEndPatternLast": 1,
2457
2476
  "patterns": [
@@ -2467,6 +2486,7 @@
2467
2486
  {
2468
2487
  "comment": "Tags that end > are trapped in #jsx-tag-termination",
2469
2488
  "name": "meta.tag.jsx",
2489
+ "contentName": "JSXAttrs",
2470
2490
  "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])(?![:])(?<!\\.|:)",
2471
2491
  "end": "\\s*(?<=</)((\\4)|\\2)(>)|(/>)|((?<=</)[\\S ]*?)>",
2472
2492
  "beginCaptures": {
@@ -2512,6 +2532,7 @@
2512
2532
  "patterns": [
2513
2533
  {
2514
2534
  "comment": "uses non consuming search for </ in </tag>",
2535
+ "contentName": "JSXNested",
2515
2536
  "begin": "(>)",
2516
2537
  "end": "(</)",
2517
2538
  "beginCaptures": {
@@ -2641,32 +2662,52 @@
2641
2662
  ]
2642
2663
  },
2643
2664
  "jsx-evaluated-code": {
2644
- "name": "meta.embedded.expression.js",
2645
- "begin": "{",
2646
- "end": "}",
2647
- "beginCaptures": {
2648
- "0": {
2649
- "name": "punctuation.section.embedded.begin.jsx"
2650
- }
2651
- },
2652
- "endCaptures": {
2653
- "0": {
2654
- "name": "punctuation.section.embedded.end.jsx"
2655
- }
2656
- },
2657
- "contentName": "source.js.jsx",
2658
2665
  "patterns": [
2659
2666
  {
2660
- "include": "#jsx-string-double-quoted"
2661
- },
2662
- {
2663
- "include": "#jsx-string-single-quoted"
2664
- },
2665
- {
2666
- "include": "#jsx-spread-attribute"
2667
+ "name": "meta.embedded.expression.commented-out.jsx",
2668
+ "contentName": "comment.embedded.jsx",
2669
+ "begin": "^\\s*({/\\*)",
2670
+ "end": "\\s*(\\*/})",
2671
+ "beginCaptures": {
2672
+ "1": {
2673
+ "name": "punctuation.section.embedded.begin.jsx"
2674
+ }
2675
+ },
2676
+ "endCaptures": {
2677
+ "1": {
2678
+ "name": "punctuation.section.embedded.end.jsx"
2679
+ }
2680
+ }
2667
2681
  },
2668
2682
  {
2669
- "include": "#expression"
2683
+ "name": "meta.embedded.expression.js",
2684
+ "contentName": "source.js.jsx",
2685
+ "begin": "{",
2686
+ "end": "}",
2687
+ "beginCaptures": {
2688
+ "0": {
2689
+ "name": "punctuation.section.embedded.begin.jsx"
2690
+ }
2691
+ },
2692
+ "endCaptures": {
2693
+ "0": {
2694
+ "name": "punctuation.section.embedded.end.jsx"
2695
+ }
2696
+ },
2697
+ "patterns": [
2698
+ {
2699
+ "include": "#jsx-string-double-quoted"
2700
+ },
2701
+ {
2702
+ "include": "#jsx-string-single-quoted"
2703
+ },
2704
+ {
2705
+ "include": "#jsx-spread-attribute"
2706
+ },
2707
+ {
2708
+ "include": "#expression"
2709
+ }
2710
+ ]
2670
2711
  }
2671
2712
  ]
2672
2713
  },
@@ -3038,7 +3079,7 @@
3038
3079
  },
3039
3080
  "flowtype-parse-objects": {
3040
3081
  "comment": "object literal flowtype preceded by either => : | & ? symbols",
3041
- "begin": "(?<=:|\\||&|\\?|=>|<)\\s*+(\\{)",
3082
+ "begin": "(?<=:|\\||&|\\?|=>|<)\\s*+({)",
3042
3083
  "end": "\\s*(\\})",
3043
3084
  "applyEndPatternLast": 1,
3044
3085
  "beginCaptures": {
@@ -3101,7 +3142,7 @@
3101
3142
  {
3102
3143
  "comment": "type aliases for export but avoid type instaceof or type in operators",
3103
3144
  "begin": "\\s*+\\b(type)\\b\\s*(?!(instanceof|in)\\b)(?=[$_A-Za-z{\\[])",
3104
- "end": "\\s*(\\;)|\\b(?=if|switch|try|var|let|const|static|function|return|class|do|for|while|debugger|export|import|yield|type|declare|interface)\\b",
3145
+ "end": "\\s*(;)|\\b(?=if|switch|try|var|let|const|static|function|return|class|do|for|while|debugger|export|import|yield|type|declare|interface)\\b",
3105
3146
  "beginCaptures": {
3106
3147
  "1": {
3107
3148
  "name": "keyword.other.typedef.flowtype"
@@ -3435,6 +3476,55 @@
3435
3476
  }
3436
3477
  }
3437
3478
  ]
3479
+ },
3480
+ "html-template": {
3481
+ "comment": "Assume object properties of template: `some html` contain html",
3482
+ "begin": "(?:(?:^|(?<=,|{))\\s*\\b((template))\\b\\s*(:)\\s*(`))",
3483
+ "end": "\\s*(`)",
3484
+ "beginCaptures": {
3485
+ "1": {
3486
+ "name": "constant.other.object.key.js"
3487
+ },
3488
+ "2": {
3489
+ "name": "string.unquoted.js"
3490
+ },
3491
+ "3": {
3492
+ "name": "punctuation.separator.key-value.js"
3493
+ },
3494
+ "4": {
3495
+ "name": "punctuation.definition.quasi.begin.js"
3496
+ }
3497
+ },
3498
+ "endCaptures": {
3499
+ "1": {
3500
+ "name": "punctuation.definition.quasi.end.js"
3501
+ }
3502
+ },
3503
+ "patterns": [
3504
+ {
3505
+ "name": "entity.quasi.element.js",
3506
+ "begin": "(?<!\\\\)\\${",
3507
+ "end": "\\s*}",
3508
+ "beginCaptures": {
3509
+ "0": {
3510
+ "name": "punctuation.quasi.element.begin.js"
3511
+ }
3512
+ },
3513
+ "endCaptures": {
3514
+ "0": {
3515
+ "name": "punctuation.quasi.element.end.js"
3516
+ }
3517
+ },
3518
+ "patterns": [
3519
+ {
3520
+ "include": "#expression"
3521
+ }
3522
+ ]
3523
+ },
3524
+ {
3525
+ "include": "text.html.mustache"
3526
+ }
3527
+ ]
3438
3528
  }
3439
3529
  }
3440
3530
  }