[typescript] update grammar to to Microsoft/TypeScript-TmLanguage@e47681d (2017-01-17). Fixes #18612
This commit is contained in:
parent
9ddc762670
commit
3956be9ba6
6 changed files with 718 additions and 544 deletions
|
@ -1970,7 +1970,7 @@
|
|||
},
|
||||
{
|
||||
"c": "function",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.js storage.type.function.js",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.expression.js storage.type.function.js",
|
||||
"r": {
|
||||
"dark_plus": "storage.type: #569CD6",
|
||||
"light_plus": "storage.type: #0000FF",
|
||||
|
@ -1981,7 +1981,7 @@
|
|||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.js",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.expression.js",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
|
@ -1992,7 +1992,7 @@
|
|||
},
|
||||
{
|
||||
"c": "(",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.js meta.parameters.js punctuation.definition.parameters.begin.js",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.expression.js meta.parameters.js punctuation.definition.parameters.begin.js",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
|
@ -2003,7 +2003,7 @@
|
|||
},
|
||||
{
|
||||
"c": ")",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.js meta.parameters.js punctuation.definition.parameters.end.js",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.expression.js meta.parameters.js punctuation.definition.parameters.end.js",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
|
@ -2014,7 +2014,7 @@
|
|||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.js",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.expression.js",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
|
@ -2025,7 +2025,7 @@
|
|||
},
|
||||
{
|
||||
"c": "{",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.js meta.block.js punctuation.definition.block.js",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.expression.js meta.block.js punctuation.definition.block.js",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
|
@ -2036,7 +2036,7 @@
|
|||
},
|
||||
{
|
||||
"c": "\t\t\t",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.js meta.block.js",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.expression.js meta.block.js",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
|
@ -2047,7 +2047,7 @@
|
|||
},
|
||||
{
|
||||
"c": "mocha",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.js meta.block.js variable.other.object.js",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.expression.js meta.block.js variable.other.object.js",
|
||||
"r": {
|
||||
"dark_plus": "variable: #9CDCFE",
|
||||
"light_plus": "variable: #001080",
|
||||
|
@ -2058,7 +2058,7 @@
|
|||
},
|
||||
{
|
||||
"c": ".",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.js meta.block.js punctuation.accessor.js",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.expression.js meta.block.js punctuation.accessor.js",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
|
@ -2069,7 +2069,7 @@
|
|||
},
|
||||
{
|
||||
"c": "run",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.js meta.block.js entity.name.function.js",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.expression.js meta.block.js entity.name.function.js",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.function: #DCDCAA",
|
||||
"light_plus": "entity.name.function: #795E26",
|
||||
|
@ -2080,7 +2080,7 @@
|
|||
},
|
||||
{
|
||||
"c": "()",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.js meta.block.js meta.brace.round.js",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.expression.js meta.block.js meta.brace.round.js",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
|
@ -2091,7 +2091,7 @@
|
|||
},
|
||||
{
|
||||
"c": ";",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.js meta.block.js punctuation.terminator.statement.js",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.expression.js meta.block.js punctuation.terminator.statement.js",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
|
@ -2102,7 +2102,7 @@
|
|||
},
|
||||
{
|
||||
"c": "\t\t",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.js meta.block.js",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.expression.js meta.block.js",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
|
@ -2113,7 +2113,7 @@
|
|||
},
|
||||
{
|
||||
"c": "}",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.js meta.block.js punctuation.definition.block.js",
|
||||
"t": "text.html.basic source.js.embedded.html meta.function.expression.js meta.block.js punctuation.definition.block.js",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
|
|
|
@ -35,9 +35,6 @@
|
|||
{
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"include": "#literal"
|
||||
},
|
||||
{
|
||||
"include": "#declaration"
|
||||
},
|
||||
|
@ -107,13 +104,7 @@
|
|||
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type-annotation"
|
||||
},
|
||||
{
|
||||
"include": "#string"
|
||||
},
|
||||
{
|
||||
"include": "#comment"
|
||||
"include": "#var-single-variable-type-annotation"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -125,7 +116,12 @@
|
|||
"name": "variable.other.constant.js"
|
||||
}
|
||||
},
|
||||
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))"
|
||||
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#var-single-variable-type-annotation"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "meta.var-single-variable.expr.js",
|
||||
|
@ -138,18 +134,25 @@
|
|||
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type-annotation"
|
||||
},
|
||||
{
|
||||
"include": "#string"
|
||||
},
|
||||
{
|
||||
"include": "#comment"
|
||||
"include": "#var-single-variable-type-annotation"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"var-single-variable-type-annotation": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type-annotation"
|
||||
},
|
||||
{
|
||||
"include": "#string"
|
||||
},
|
||||
{
|
||||
"include": "#comment"
|
||||
}
|
||||
]
|
||||
},
|
||||
"destructuring-variable": {
|
||||
"patterns": [
|
||||
{
|
||||
|
@ -335,7 +338,6 @@
|
|||
]
|
||||
},
|
||||
"expression": {
|
||||
"name": "meta.expression.js",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#jsx"
|
||||
|
@ -353,10 +355,7 @@
|
|||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"include": "#literal"
|
||||
},
|
||||
{
|
||||
"include": "#function-declaration"
|
||||
"include": "#function-expression"
|
||||
},
|
||||
{
|
||||
"include": "#class-or-interface-declaration"
|
||||
|
@ -382,6 +381,9 @@
|
|||
{
|
||||
"include": "#function-call"
|
||||
},
|
||||
{
|
||||
"include": "#literal"
|
||||
},
|
||||
{
|
||||
"include": "#support-objects"
|
||||
},
|
||||
|
@ -413,17 +415,6 @@
|
|||
"name": "keyword.control.flow.js",
|
||||
"match": "(?<!\\.|\\$)\\b(return)\\b(?!\\$)"
|
||||
},
|
||||
{
|
||||
"match": "(?<!\\.|\\$)\\b(yield)\\b(?!\\$)(?:\\s*(\\*))?",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.control.flow.js"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.generator.asterisk.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "keyword.control.switch.js",
|
||||
"match": "(?<!\\.|\\$)\\b(case|default|switch)\\b(?!\\$)"
|
||||
|
@ -447,7 +438,6 @@
|
|||
]
|
||||
},
|
||||
"declaration": {
|
||||
"name": "meta.declaration.js",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#decorator"
|
||||
|
@ -884,7 +874,7 @@
|
|||
},
|
||||
"class-or-interface-declaration": {
|
||||
"name": "meta.class.js",
|
||||
"begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(?:(class)|(interface))\\b",
|
||||
"begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(?:(class)|(interface))\\b(?=\\s+|/[/*])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.control.export.js"
|
||||
|
@ -1354,7 +1344,43 @@
|
|||
"name": "entity.name.function.js"
|
||||
}
|
||||
},
|
||||
"end": "(?=$|;|\\})|(?<=\\})",
|
||||
"end": "(?=$|;)|(?<=\\})",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"include": "#type-parameters"
|
||||
},
|
||||
{
|
||||
"include": "#function-parameters"
|
||||
},
|
||||
{
|
||||
"include": "#return-type"
|
||||
},
|
||||
{
|
||||
"include": "#decl-block"
|
||||
}
|
||||
]
|
||||
},
|
||||
"function-expression": {
|
||||
"name": "meta.function.expression.js",
|
||||
"begin": "(?<!\\.|\\$)\\b(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.async.js"
|
||||
},
|
||||
"2": {
|
||||
"name": "storage.type.function.js"
|
||||
},
|
||||
"3": {
|
||||
"name": "keyword.generator.asterisk.js"
|
||||
},
|
||||
"4": {
|
||||
"name": "entity.name.function.js"
|
||||
}
|
||||
},
|
||||
"end": "(?<=\\})",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
|
@ -1642,7 +1668,7 @@
|
|||
"name": "keyword.operator.type.annotation.js"
|
||||
}
|
||||
},
|
||||
"end": "(?<!:)((?=$)|(?=\\{|;|//|\\}))",
|
||||
"end": "(?<!:)((?=$)|(?=[{};,]|//))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
|
@ -1698,7 +1724,6 @@
|
|||
]
|
||||
},
|
||||
"type": {
|
||||
"name": "meta.type.js",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
|
@ -1837,16 +1862,6 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "meta.type.function.js",
|
||||
"begin": "(?<=\\>)\\s*(?=\\()",
|
||||
"end": "(?<=\\))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#function-parameters"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "meta.type.function.js",
|
||||
"begin": "(?x)(\n (?=\n [(]\\s*(\n ([)]) | \n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )\n )\n)",
|
||||
|
@ -2297,12 +2312,18 @@
|
|||
]
|
||||
},
|
||||
"function-call": {
|
||||
"begin": "(?=(\\.\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
|
||||
"end": "(?<=\\))(?!(\\.\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
|
||||
"end": "(?<=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#literal"
|
||||
},
|
||||
{
|
||||
"include": "#support-objects"
|
||||
},
|
||||
{
|
||||
"include": "#object-identifiers"
|
||||
},
|
||||
{
|
||||
"include": "#punctuation-accessor"
|
||||
},
|
||||
|
@ -2344,22 +2365,7 @@
|
|||
"identifiers": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "support.class.js",
|
||||
"match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\.\\s*prototype\\b(?!\\$))"
|
||||
},
|
||||
{
|
||||
"match": "(?x)(\\.)\\s*(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.accessor.js"
|
||||
},
|
||||
"2": {
|
||||
"name": "variable.other.constant.object.property.js"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.other.object.property.js"
|
||||
}
|
||||
}
|
||||
"include": "#object-identifiers"
|
||||
},
|
||||
{
|
||||
"match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n (async\\s+)|(function\\s*[(<])|(function\\s+)|\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)|\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)))",
|
||||
|
@ -2394,6 +2400,36 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "variable.other.constant.js",
|
||||
"match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
|
||||
},
|
||||
{
|
||||
"name": "variable.other.readwrite.js",
|
||||
"match": "[_$[:alpha:]][_$[:alnum:]]*"
|
||||
}
|
||||
]
|
||||
},
|
||||
"object-identifiers": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "support.class.js",
|
||||
"match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\.\\s*prototype\\b(?!\\$))"
|
||||
},
|
||||
{
|
||||
"match": "(?x)(\\.)\\s*(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.accessor.js"
|
||||
},
|
||||
"2": {
|
||||
"name": "variable.other.constant.object.property.js"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.other.object.property.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
|
||||
"captures": {
|
||||
|
@ -2404,14 +2440,6 @@
|
|||
"name": "variable.other.object.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "variable.other.constant.js",
|
||||
"match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
|
||||
},
|
||||
{
|
||||
"name": "variable.other.readwrite.js",
|
||||
"match": "[_$[:alpha:]][_$[:alnum:]]*"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -2553,6 +2581,17 @@
|
|||
"name": "keyword.control.flow.js",
|
||||
"match": "(?<!\\.|\\$)\\b(await)\\b(?!\\$)"
|
||||
},
|
||||
{
|
||||
"match": "(?<!\\.|\\$)\\b(yield)\\b(?!\\$)(?:\\s*(\\*))?",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.control.flow.js"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.generator.asterisk.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.expression.delete.js",
|
||||
"match": "(?<!\\.|\\$)\\bdelete\\b(?!\\$)"
|
||||
|
@ -2672,13 +2711,13 @@
|
|||
},
|
||||
{
|
||||
"name": "meta.arrow.js",
|
||||
"begin": "(?x) (?:\n (?<!\\.|\\$)(\\basync)(?=\\s*[<(])\n) | (\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ([_$[:alpha:]][_$[:alnum:]]*\\s*:) | # [(]param:\n (\\.\\.\\.) # [(]...\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\n (\n (\\s+extends\\s*[^=>]) | # < typeparam extends \n (\\s*[,]) # < typeparam,\n )\n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>]|\\<[^<>]+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)",
|
||||
"begin": "(?x) (?:\n (?<!\\.|\\$)(\\basync)(?=\\s*[<(])\n) | ((?<![})\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ([_$[:alpha:]][_$[:alnum:]]*\\s*:) | # [(]param:\n (\\.\\.\\.) # [(]...\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>]|\\<[^<>]+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.async.js"
|
||||
}
|
||||
},
|
||||
"end": "(?==>)",
|
||||
"end": "(?==>|\\{)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
|
@ -2722,8 +2761,28 @@
|
|||
"name": "keyword.operator.type.annotation.js"
|
||||
}
|
||||
},
|
||||
"end": "(?<!:)((?=$)|(?==>|;|//))",
|
||||
"end": "(?==>|\\{)",
|
||||
"patterns": [
|
||||
{
|
||||
"name": "meta.object.type.js",
|
||||
"begin": "(?<=:)\\s*(\\{)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.block.js"
|
||||
}
|
||||
},
|
||||
"end": "\\}",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.block.js"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type-object-members"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"include": "#type-predicate-operator"
|
||||
},
|
||||
|
@ -3065,7 +3124,6 @@
|
|||
]
|
||||
},
|
||||
"literal": {
|
||||
"name": "literal.js",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#numeric-literal"
|
||||
|
@ -3648,5 +3706,5 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/f97fcdbb2f80123605982ca63b9ba68bb837df87"
|
||||
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/e47681d06a4db46d286c53b14ab0a5ab17e71cd8"
|
||||
}
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -34,9 +34,6 @@
|
|||
{
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"include": "#literal"
|
||||
},
|
||||
{
|
||||
"include": "#declaration"
|
||||
},
|
||||
|
@ -106,13 +103,7 @@
|
|||
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type-annotation"
|
||||
},
|
||||
{
|
||||
"include": "#string"
|
||||
},
|
||||
{
|
||||
"include": "#comment"
|
||||
"include": "#var-single-variable-type-annotation"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -124,7 +115,12 @@
|
|||
"name": "variable.other.constant.ts"
|
||||
}
|
||||
},
|
||||
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))"
|
||||
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#var-single-variable-type-annotation"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "meta.var-single-variable.expr.ts",
|
||||
|
@ -137,18 +133,25 @@
|
|||
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type-annotation"
|
||||
},
|
||||
{
|
||||
"include": "#string"
|
||||
},
|
||||
{
|
||||
"include": "#comment"
|
||||
"include": "#var-single-variable-type-annotation"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"var-single-variable-type-annotation": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type-annotation"
|
||||
},
|
||||
{
|
||||
"include": "#string"
|
||||
},
|
||||
{
|
||||
"include": "#comment"
|
||||
}
|
||||
]
|
||||
},
|
||||
"destructuring-variable": {
|
||||
"patterns": [
|
||||
{
|
||||
|
@ -334,7 +337,6 @@
|
|||
]
|
||||
},
|
||||
"expression": {
|
||||
"name": "meta.expression.ts",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#string"
|
||||
|
@ -349,10 +351,7 @@
|
|||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"include": "#literal"
|
||||
},
|
||||
{
|
||||
"include": "#function-declaration"
|
||||
"include": "#function-expression"
|
||||
},
|
||||
{
|
||||
"include": "#class-or-interface-declaration"
|
||||
|
@ -378,6 +377,9 @@
|
|||
{
|
||||
"include": "#function-call"
|
||||
},
|
||||
{
|
||||
"include": "#literal"
|
||||
},
|
||||
{
|
||||
"include": "#support-objects"
|
||||
},
|
||||
|
@ -409,17 +411,6 @@
|
|||
"name": "keyword.control.flow.ts",
|
||||
"match": "(?<!\\.|\\$)\\b(return)\\b(?!\\$)"
|
||||
},
|
||||
{
|
||||
"match": "(?<!\\.|\\$)\\b(yield)\\b(?!\\$)(?:\\s*(\\*))?",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.control.flow.ts"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.generator.asterisk.ts"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "keyword.control.switch.ts",
|
||||
"match": "(?<!\\.|\\$)\\b(case|default|switch)\\b(?!\\$)"
|
||||
|
@ -443,7 +434,6 @@
|
|||
]
|
||||
},
|
||||
"declaration": {
|
||||
"name": "meta.declaration.ts",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#decorator"
|
||||
|
@ -880,7 +870,7 @@
|
|||
},
|
||||
"class-or-interface-declaration": {
|
||||
"name": "meta.class.ts",
|
||||
"begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(?:(class)|(interface))\\b",
|
||||
"begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(?:(class)|(interface))\\b(?=\\s+|/[/*])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.control.export.ts"
|
||||
|
@ -1350,7 +1340,43 @@
|
|||
"name": "entity.name.function.ts"
|
||||
}
|
||||
},
|
||||
"end": "(?=$|;|\\})|(?<=\\})",
|
||||
"end": "(?=$|;)|(?<=\\})",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"include": "#type-parameters"
|
||||
},
|
||||
{
|
||||
"include": "#function-parameters"
|
||||
},
|
||||
{
|
||||
"include": "#return-type"
|
||||
},
|
||||
{
|
||||
"include": "#decl-block"
|
||||
}
|
||||
]
|
||||
},
|
||||
"function-expression": {
|
||||
"name": "meta.function.expression.ts",
|
||||
"begin": "(?<!\\.|\\$)\\b(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.async.ts"
|
||||
},
|
||||
"2": {
|
||||
"name": "storage.type.function.ts"
|
||||
},
|
||||
"3": {
|
||||
"name": "keyword.generator.asterisk.ts"
|
||||
},
|
||||
"4": {
|
||||
"name": "entity.name.function.ts"
|
||||
}
|
||||
},
|
||||
"end": "(?<=\\})",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
|
@ -1638,7 +1664,7 @@
|
|||
"name": "keyword.operator.type.annotation.ts"
|
||||
}
|
||||
},
|
||||
"end": "(?<!:)((?=$)|(?=\\{|;|//|\\}))",
|
||||
"end": "(?<!:)((?=$)|(?=[{};,]|//))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
|
@ -1694,7 +1720,6 @@
|
|||
]
|
||||
},
|
||||
"type": {
|
||||
"name": "meta.type.ts",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
|
@ -1833,16 +1858,6 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "meta.type.function.ts",
|
||||
"begin": "(?<=\\>)\\s*(?=\\()",
|
||||
"end": "(?<=\\))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#function-parameters"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "meta.type.function.ts",
|
||||
"begin": "(?x)(\n (?=\n [(]\\s*(\n ([)]) | \n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )\n )\n)",
|
||||
|
@ -2293,12 +2308,18 @@
|
|||
]
|
||||
},
|
||||
"function-call": {
|
||||
"begin": "(?=(\\.\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
|
||||
"end": "(?<=\\))(?!(\\.\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
|
||||
"end": "(?<=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#literal"
|
||||
},
|
||||
{
|
||||
"include": "#support-objects"
|
||||
},
|
||||
{
|
||||
"include": "#object-identifiers"
|
||||
},
|
||||
{
|
||||
"include": "#punctuation-accessor"
|
||||
},
|
||||
|
@ -2340,22 +2361,7 @@
|
|||
"identifiers": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "support.class.ts",
|
||||
"match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\.\\s*prototype\\b(?!\\$))"
|
||||
},
|
||||
{
|
||||
"match": "(?x)(\\.)\\s*(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.accessor.ts"
|
||||
},
|
||||
"2": {
|
||||
"name": "variable.other.constant.object.property.ts"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.other.object.property.ts"
|
||||
}
|
||||
}
|
||||
"include": "#object-identifiers"
|
||||
},
|
||||
{
|
||||
"match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n (async\\s+)|(function\\s*[(<])|(function\\s+)|\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)|\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)))",
|
||||
|
@ -2390,6 +2396,36 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "variable.other.constant.ts",
|
||||
"match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
|
||||
},
|
||||
{
|
||||
"name": "variable.other.readwrite.ts",
|
||||
"match": "[_$[:alpha:]][_$[:alnum:]]*"
|
||||
}
|
||||
]
|
||||
},
|
||||
"object-identifiers": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "support.class.ts",
|
||||
"match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\.\\s*prototype\\b(?!\\$))"
|
||||
},
|
||||
{
|
||||
"match": "(?x)(\\.)\\s*(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.accessor.ts"
|
||||
},
|
||||
"2": {
|
||||
"name": "variable.other.constant.object.property.ts"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.other.object.property.ts"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
|
||||
"captures": {
|
||||
|
@ -2400,14 +2436,6 @@
|
|||
"name": "variable.other.object.ts"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "variable.other.constant.ts",
|
||||
"match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
|
||||
},
|
||||
{
|
||||
"name": "variable.other.readwrite.ts",
|
||||
"match": "[_$[:alpha:]][_$[:alnum:]]*"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -2562,6 +2590,17 @@
|
|||
"name": "keyword.control.flow.ts",
|
||||
"match": "(?<!\\.|\\$)\\b(await)\\b(?!\\$)"
|
||||
},
|
||||
{
|
||||
"match": "(?<!\\.|\\$)\\b(yield)\\b(?!\\$)(?:\\s*(\\*))?",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.control.flow.ts"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.generator.asterisk.ts"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.expression.delete.ts",
|
||||
"match": "(?<!\\.|\\$)\\bdelete\\b(?!\\$)"
|
||||
|
@ -2681,13 +2720,13 @@
|
|||
},
|
||||
{
|
||||
"name": "meta.arrow.ts",
|
||||
"begin": "(?x) (?:\n (?<!\\.|\\$)(\\basync)(?=\\s*[<(])\n) | (\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ([_$[:alpha:]][_$[:alnum:]]*\\s*:) | # [(]param:\n (\\.\\.\\.) # [(]...\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\n (\n (\\s+extends\\s*[^=>]) | # < typeparam extends \n (\\s*[,]) # < typeparam,\n )\n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>]|\\<[^<>]+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)",
|
||||
"begin": "(?x) (?:\n (?<!\\.|\\$)(\\basync)(?=\\s*[<(])\n) | ((?<![})\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ([_$[:alpha:]][_$[:alnum:]]*\\s*:) | # [(]param:\n (\\.\\.\\.) # [(]...\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>]|\\<[^<>]+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.async.ts"
|
||||
}
|
||||
},
|
||||
"end": "(?==>)",
|
||||
"end": "(?==>|\\{)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
|
@ -2731,8 +2770,28 @@
|
|||
"name": "keyword.operator.type.annotation.ts"
|
||||
}
|
||||
},
|
||||
"end": "(?<!:)((?=$)|(?==>|;|//))",
|
||||
"end": "(?==>|\\{)",
|
||||
"patterns": [
|
||||
{
|
||||
"name": "meta.object.type.ts",
|
||||
"begin": "(?<=:)\\s*(\\{)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.block.ts"
|
||||
}
|
||||
},
|
||||
"end": "\\}",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.block.ts"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type-object-members"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"include": "#type-predicate-operator"
|
||||
},
|
||||
|
@ -3074,7 +3133,6 @@
|
|||
]
|
||||
},
|
||||
"literal": {
|
||||
"name": "literal.ts",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#numeric-literal"
|
||||
|
@ -3376,5 +3434,5 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/f97fcdbb2f80123605982ca63b9ba68bb837df87"
|
||||
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/e47681d06a4db46d286c53b14ab0a5ab17e71cd8"
|
||||
}
|
|
@ -34,9 +34,6 @@
|
|||
{
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"include": "#literal"
|
||||
},
|
||||
{
|
||||
"include": "#declaration"
|
||||
},
|
||||
|
@ -106,13 +103,7 @@
|
|||
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type-annotation"
|
||||
},
|
||||
{
|
||||
"include": "#string"
|
||||
},
|
||||
{
|
||||
"include": "#comment"
|
||||
"include": "#var-single-variable-type-annotation"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -124,7 +115,12 @@
|
|||
"name": "variable.other.constant.tsx"
|
||||
}
|
||||
},
|
||||
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))"
|
||||
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#var-single-variable-type-annotation"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "meta.var-single-variable.expr.tsx",
|
||||
|
@ -137,18 +133,25 @@
|
|||
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type-annotation"
|
||||
},
|
||||
{
|
||||
"include": "#string"
|
||||
},
|
||||
{
|
||||
"include": "#comment"
|
||||
"include": "#var-single-variable-type-annotation"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"var-single-variable-type-annotation": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type-annotation"
|
||||
},
|
||||
{
|
||||
"include": "#string"
|
||||
},
|
||||
{
|
||||
"include": "#comment"
|
||||
}
|
||||
]
|
||||
},
|
||||
"destructuring-variable": {
|
||||
"patterns": [
|
||||
{
|
||||
|
@ -334,7 +337,6 @@
|
|||
]
|
||||
},
|
||||
"expression": {
|
||||
"name": "meta.expression.tsx",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#jsx"
|
||||
|
@ -352,10 +354,7 @@
|
|||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"include": "#literal"
|
||||
},
|
||||
{
|
||||
"include": "#function-declaration"
|
||||
"include": "#function-expression"
|
||||
},
|
||||
{
|
||||
"include": "#class-or-interface-declaration"
|
||||
|
@ -381,6 +380,9 @@
|
|||
{
|
||||
"include": "#function-call"
|
||||
},
|
||||
{
|
||||
"include": "#literal"
|
||||
},
|
||||
{
|
||||
"include": "#support-objects"
|
||||
},
|
||||
|
@ -412,17 +414,6 @@
|
|||
"name": "keyword.control.flow.tsx",
|
||||
"match": "(?<!\\.|\\$)\\b(return)\\b(?!\\$)"
|
||||
},
|
||||
{
|
||||
"match": "(?<!\\.|\\$)\\b(yield)\\b(?!\\$)(?:\\s*(\\*))?",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.control.flow.tsx"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.generator.asterisk.tsx"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "keyword.control.switch.tsx",
|
||||
"match": "(?<!\\.|\\$)\\b(case|default|switch)\\b(?!\\$)"
|
||||
|
@ -446,7 +437,6 @@
|
|||
]
|
||||
},
|
||||
"declaration": {
|
||||
"name": "meta.declaration.tsx",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#decorator"
|
||||
|
@ -883,7 +873,7 @@
|
|||
},
|
||||
"class-or-interface-declaration": {
|
||||
"name": "meta.class.tsx",
|
||||
"begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(?:(class)|(interface))\\b",
|
||||
"begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(?:(class)|(interface))\\b(?=\\s+|/[/*])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.control.export.tsx"
|
||||
|
@ -1353,7 +1343,43 @@
|
|||
"name": "entity.name.function.tsx"
|
||||
}
|
||||
},
|
||||
"end": "(?=$|;|\\})|(?<=\\})",
|
||||
"end": "(?=$|;)|(?<=\\})",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"include": "#type-parameters"
|
||||
},
|
||||
{
|
||||
"include": "#function-parameters"
|
||||
},
|
||||
{
|
||||
"include": "#return-type"
|
||||
},
|
||||
{
|
||||
"include": "#decl-block"
|
||||
}
|
||||
]
|
||||
},
|
||||
"function-expression": {
|
||||
"name": "meta.function.expression.tsx",
|
||||
"begin": "(?<!\\.|\\$)\\b(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.async.tsx"
|
||||
},
|
||||
"2": {
|
||||
"name": "storage.type.function.tsx"
|
||||
},
|
||||
"3": {
|
||||
"name": "keyword.generator.asterisk.tsx"
|
||||
},
|
||||
"4": {
|
||||
"name": "entity.name.function.tsx"
|
||||
}
|
||||
},
|
||||
"end": "(?<=\\})",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
|
@ -1641,7 +1667,7 @@
|
|||
"name": "keyword.operator.type.annotation.tsx"
|
||||
}
|
||||
},
|
||||
"end": "(?<!:)((?=$)|(?=\\{|;|//|\\}))",
|
||||
"end": "(?<!:)((?=$)|(?=[{};,]|//))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
|
@ -1697,7 +1723,6 @@
|
|||
]
|
||||
},
|
||||
"type": {
|
||||
"name": "meta.type.tsx",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
|
@ -1836,16 +1861,6 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "meta.type.function.tsx",
|
||||
"begin": "(?<=\\>)\\s*(?=\\()",
|
||||
"end": "(?<=\\))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#function-parameters"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "meta.type.function.tsx",
|
||||
"begin": "(?x)(\n (?=\n [(]\\s*(\n ([)]) | \n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )\n )\n)",
|
||||
|
@ -2296,12 +2311,18 @@
|
|||
]
|
||||
},
|
||||
"function-call": {
|
||||
"begin": "(?=(\\.\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
|
||||
"end": "(?<=\\))(?!(\\.\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
|
||||
"end": "(?<=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#literal"
|
||||
},
|
||||
{
|
||||
"include": "#support-objects"
|
||||
},
|
||||
{
|
||||
"include": "#object-identifiers"
|
||||
},
|
||||
{
|
||||
"include": "#punctuation-accessor"
|
||||
},
|
||||
|
@ -2343,22 +2364,7 @@
|
|||
"identifiers": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "support.class.tsx",
|
||||
"match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\.\\s*prototype\\b(?!\\$))"
|
||||
},
|
||||
{
|
||||
"match": "(?x)(\\.)\\s*(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.accessor.tsx"
|
||||
},
|
||||
"2": {
|
||||
"name": "variable.other.constant.object.property.tsx"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.other.object.property.tsx"
|
||||
}
|
||||
}
|
||||
"include": "#object-identifiers"
|
||||
},
|
||||
{
|
||||
"match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n (async\\s+)|(function\\s*[(<])|(function\\s+)|\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)|\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)))",
|
||||
|
@ -2393,6 +2399,36 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "variable.other.constant.tsx",
|
||||
"match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
|
||||
},
|
||||
{
|
||||
"name": "variable.other.readwrite.tsx",
|
||||
"match": "[_$[:alpha:]][_$[:alnum:]]*"
|
||||
}
|
||||
]
|
||||
},
|
||||
"object-identifiers": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "support.class.tsx",
|
||||
"match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\.\\s*prototype\\b(?!\\$))"
|
||||
},
|
||||
{
|
||||
"match": "(?x)(\\.)\\s*(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.accessor.tsx"
|
||||
},
|
||||
"2": {
|
||||
"name": "variable.other.constant.object.property.tsx"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.other.object.property.tsx"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
|
||||
"captures": {
|
||||
|
@ -2403,14 +2439,6 @@
|
|||
"name": "variable.other.object.tsx"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "variable.other.constant.tsx",
|
||||
"match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
|
||||
},
|
||||
{
|
||||
"name": "variable.other.readwrite.tsx",
|
||||
"match": "[_$[:alpha:]][_$[:alnum:]]*"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -2552,6 +2580,17 @@
|
|||
"name": "keyword.control.flow.tsx",
|
||||
"match": "(?<!\\.|\\$)\\b(await)\\b(?!\\$)"
|
||||
},
|
||||
{
|
||||
"match": "(?<!\\.|\\$)\\b(yield)\\b(?!\\$)(?:\\s*(\\*))?",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.control.flow.tsx"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.generator.asterisk.tsx"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.expression.delete.tsx",
|
||||
"match": "(?<!\\.|\\$)\\bdelete\\b(?!\\$)"
|
||||
|
@ -2671,13 +2710,13 @@
|
|||
},
|
||||
{
|
||||
"name": "meta.arrow.tsx",
|
||||
"begin": "(?x) (?:\n (?<!\\.|\\$)(\\basync)(?=\\s*[<(])\n) | (\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ([_$[:alpha:]][_$[:alnum:]]*\\s*:) | # [(]param:\n (\\.\\.\\.) # [(]...\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\n (\n (\\s+extends\\s*[^=>]) | # < typeparam extends \n (\\s*[,]) # < typeparam,\n )\n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>]|\\<[^<>]+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)",
|
||||
"begin": "(?x) (?:\n (?<!\\.|\\$)(\\basync)(?=\\s*[<(])\n) | ((?<![})\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ([_$[:alpha:]][_$[:alnum:]]*\\s*:) | # [(]param:\n (\\.\\.\\.) # [(]...\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>]|\\<[^<>]+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.async.tsx"
|
||||
}
|
||||
},
|
||||
"end": "(?==>)",
|
||||
"end": "(?==>|\\{)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
|
@ -2721,8 +2760,28 @@
|
|||
"name": "keyword.operator.type.annotation.tsx"
|
||||
}
|
||||
},
|
||||
"end": "(?<!:)((?=$)|(?==>|;|//))",
|
||||
"end": "(?==>|\\{)",
|
||||
"patterns": [
|
||||
{
|
||||
"name": "meta.object.type.tsx",
|
||||
"begin": "(?<=:)\\s*(\\{)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.block.tsx"
|
||||
}
|
||||
},
|
||||
"end": "\\}",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.block.tsx"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type-object-members"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"include": "#type-predicate-operator"
|
||||
},
|
||||
|
@ -3064,7 +3123,6 @@
|
|||
]
|
||||
},
|
||||
"literal": {
|
||||
"name": "literal.tsx",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#numeric-literal"
|
||||
|
@ -3647,5 +3705,5 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/f97fcdbb2f80123605982ca63b9ba68bb837df87"
|
||||
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/e47681d06a4db46d286c53b14ab0a5ab17e71cd8"
|
||||
}
|
Loading…
Reference in a new issue