mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
[typescript] update grammar
This commit is contained in:
@@ -7,8 +7,20 @@
|
||||
],
|
||||
"uuid": "805375ec-d614-41f5-8993-5843fe63ea82",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#directives"
|
||||
},
|
||||
{
|
||||
"include": "#statements"
|
||||
},
|
||||
{
|
||||
"name": "comment.line.shebang.ts",
|
||||
"match": "\\A(#!).*(?=$)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.comment.ts"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
@@ -17,9 +29,6 @@
|
||||
{
|
||||
"include": "#string"
|
||||
},
|
||||
{
|
||||
"include": "#regex"
|
||||
},
|
||||
{
|
||||
"include": "#template"
|
||||
},
|
||||
@@ -86,23 +95,48 @@
|
||||
]
|
||||
},
|
||||
"var-single-variable": {
|
||||
"name": "meta.var-single-variable.expr.js",
|
||||
"begin": "([_$[:alpha:]][_$[:alnum:]]*)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "variable.other.readwrite.js"
|
||||
}
|
||||
},
|
||||
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type-annotation"
|
||||
"name": "meta.var-single-variable.expr.js",
|
||||
"begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s* (=\\s*( (async\\s+) | (function\\s*[(<]) | (function\\s+) | ([_$[:alpha:]][_$[:alnum:]]*\\s*=>) | ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)) ) | (:\\s*( (<) | ([(]\\s*( ([)]) | (\\.\\.\\.) | ([_$[:alnum:]]+\\s*( ([:,?=])| ([)]\\s*=>) )) ))) ))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.function.js"
|
||||
}
|
||||
},
|
||||
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type-annotation"
|
||||
},
|
||||
{
|
||||
"include": "#string"
|
||||
},
|
||||
{
|
||||
"include": "#comment"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"include": "#string"
|
||||
},
|
||||
{
|
||||
"include": "#comment"
|
||||
"name": "meta.var-single-variable.expr.js",
|
||||
"begin": "([_$[:alpha:]][_$[:alnum:]]*)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "variable.other.readwrite.js"
|
||||
}
|
||||
},
|
||||
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type-annotation"
|
||||
},
|
||||
{
|
||||
"include": "#string"
|
||||
},
|
||||
{
|
||||
"include": "#comment"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -148,29 +182,14 @@
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "variable.object.property.js"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.destructuring.js"
|
||||
}
|
||||
},
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(:))",
|
||||
"end": "(?=,|\\})",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#object-binding-pattern"
|
||||
"include": "#object-binding-element-propertyName"
|
||||
},
|
||||
{
|
||||
"include": "#array-binding-pattern"
|
||||
},
|
||||
{
|
||||
"name": "variable.other.readwrite.js",
|
||||
"match": "([_$[:alpha:]][_$[:alnum:]]*)"
|
||||
},
|
||||
{
|
||||
"include": "#variable-initializer"
|
||||
"include": "#binding-element"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -188,7 +207,28 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"array-binding-element": {
|
||||
"object-binding-element-propertyName": {
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(:))",
|
||||
"end": "(:)",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.destructuring.js"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#string"
|
||||
},
|
||||
{
|
||||
"include": "#array-literal"
|
||||
},
|
||||
{
|
||||
"name": "variable.object.property.js",
|
||||
"match": "([_$[:alpha:]][_$[:alnum:]]*)"
|
||||
}
|
||||
]
|
||||
},
|
||||
"binding-element": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
@@ -204,9 +244,6 @@
|
||||
},
|
||||
{
|
||||
"include": "#variable-initializer"
|
||||
},
|
||||
{
|
||||
"include": "#punctuation-comma"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -261,7 +298,10 @@
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#array-binding-element"
|
||||
"include": "#binding-element"
|
||||
},
|
||||
{
|
||||
"include": "#punctuation-comma"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -342,10 +382,10 @@
|
||||
"include": "#expression-operators"
|
||||
},
|
||||
{
|
||||
"include": "#support-objects"
|
||||
"include": "#function-call"
|
||||
},
|
||||
{
|
||||
"include": "#function-call"
|
||||
"include": "#support-objects"
|
||||
},
|
||||
{
|
||||
"include": "#identifiers"
|
||||
@@ -550,12 +590,15 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")))",
|
||||
"begin": "(?=((\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\])))",
|
||||
"end": "(?=,|\\}|$)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#string"
|
||||
},
|
||||
{
|
||||
"include": "#array-literal"
|
||||
},
|
||||
{
|
||||
"include": "#comment"
|
||||
},
|
||||
@@ -912,7 +955,7 @@
|
||||
"include": "#type-parameters"
|
||||
},
|
||||
{
|
||||
"match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)",
|
||||
"match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)(?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)*\\s*([,<{]|extends|implements|//|/\\*))",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.name.type.module.js"
|
||||
@@ -923,12 +966,15 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "([_$[:alpha:]][_$[:alnum:]]*)",
|
||||
"match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*([,<{]|extends|implements|//|/\\*))",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.other.inherited-class.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"include": "#expression"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1048,7 +1094,7 @@
|
||||
},
|
||||
"field-declaration": {
|
||||
"name": "meta.field.declaration.js",
|
||||
"begin": "(?<!\\()(?:(?<!\\.|\\$)\\b(readonly)\\s+)?(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[[^\\]]*\\]))\\s*(\\?\\s*)?(=|:))",
|
||||
"begin": "(?<!\\()(?:(?<!\\.|\\$)\\b(readonly)\\s+)?(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(\\?\\s*)?(=|:))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.js"
|
||||
@@ -1060,7 +1106,7 @@
|
||||
"include": "#variable-initializer"
|
||||
},
|
||||
{
|
||||
"begin": "(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(\\[[^\\]]*\\]))\\s*(\\?\\s*)?(=|:))",
|
||||
"begin": "(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(\\?\\s*)?(=|:))",
|
||||
"end": "(?=[};,=]|$)|(?<=\\})",
|
||||
"patterns": [
|
||||
{
|
||||
@@ -1075,6 +1121,10 @@
|
||||
{
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"name": "entity.name.function.js",
|
||||
"match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s* (=\\s*( (async\\s+) | (function\\s*[(<]) | (function\\s+) | ([_$[:alpha:]][_$[:alnum:]]*\\s*=>) | ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)) ) | (:\\s*( (<) | ([(]\\s*( ([)]) | (\\.\\.\\.) | ([_$[:alnum:]]+\\s*( ([:,?=])| ([)]\\s*=>) )) ))) ))"
|
||||
},
|
||||
{
|
||||
"name": "variable.object.property.js",
|
||||
"match": "[_$[:alpha:]][_$[:alnum:]]*"
|
||||
@@ -1089,7 +1139,7 @@
|
||||
},
|
||||
"method-declaration": {
|
||||
"name": "meta.method.declaration.js",
|
||||
"begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[[^\\]]*\\]))\\s*(\\??))?\\s*[\\(\\<]))",
|
||||
"begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(\\??))?\\s*[\\(\\<]))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.js"
|
||||
@@ -1139,7 +1189,7 @@
|
||||
]
|
||||
},
|
||||
"method-overload-declaration": {
|
||||
"begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[[^\\]]*\\]))\\s*(\\??))?\\s*[\\(\\<]))",
|
||||
"begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(\\??))?\\s*[\\(\\<]))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.js"
|
||||
@@ -1171,7 +1221,7 @@
|
||||
]
|
||||
},
|
||||
"method-declaration-name": {
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[[^\\]]*\\]))\\s*(\\??)\\s*[\\(\\<])",
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(\\??)\\s*[\\(\\<])",
|
||||
"end": "(?=\\(|\\<)",
|
||||
"patterns": [
|
||||
{
|
||||
@@ -1343,24 +1393,48 @@
|
||||
]
|
||||
},
|
||||
"parameter-name": {
|
||||
"match": "(?:\\s*\\b(readonly)\\s+)?(?:\\s*\\b(public|private|protected)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\??)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.js"
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(?x)(?:\\s*\\b(readonly)\\s+)?(?:\\s*\\b(public|private|protected)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\??)(?=\\s* (=\\s*( (async\\s+) | (function\\s*[(<]) | (function\\s+) | ([_$[:alpha:]][_$[:alnum:]]*\\s*=>) | ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)) ) | (:\\s*( (<) | ([(]\\s*( ([)]) | (\\.\\.\\.) | ([_$[:alnum:]]+\\s*( ([:,?=])| ([)]\\s*=>) )) ))) ))",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.js"
|
||||
},
|
||||
"2": {
|
||||
"name": "storage.modifier.js"
|
||||
},
|
||||
"3": {
|
||||
"name": "keyword.operator.rest.js"
|
||||
},
|
||||
"4": {
|
||||
"name": "entity.name.function.js"
|
||||
},
|
||||
"5": {
|
||||
"name": "keyword.operator.optional.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"2": {
|
||||
"name": "storage.modifier.js"
|
||||
},
|
||||
"3": {
|
||||
"name": "keyword.operator.rest.js"
|
||||
},
|
||||
"4": {
|
||||
"name": "variable.parameter.js"
|
||||
},
|
||||
"5": {
|
||||
"name": "keyword.operator.optional.js"
|
||||
{
|
||||
"match": "(?:\\s*\\b(readonly)\\s+)?(?:\\s*\\b(public|private|protected)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\??)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.js"
|
||||
},
|
||||
"2": {
|
||||
"name": "storage.modifier.js"
|
||||
},
|
||||
"3": {
|
||||
"name": "keyword.operator.rest.js"
|
||||
},
|
||||
"4": {
|
||||
"name": "variable.parameter.js"
|
||||
},
|
||||
"5": {
|
||||
"name": "keyword.operator.optional.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"destructuring-parameter": {
|
||||
"patterns": [
|
||||
@@ -1400,7 +1474,10 @@
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#parameter-array-binding-element"
|
||||
"include": "#parameter-binding-element"
|
||||
},
|
||||
{
|
||||
"include": "#punctuation-comma"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1412,29 +1489,14 @@
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "variable.object.property.js"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.destructuring.js"
|
||||
}
|
||||
},
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(:))",
|
||||
"end": "(?=,|\\})",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#parameter-object-binding-pattern"
|
||||
"include": "#object-binding-element-propertyName"
|
||||
},
|
||||
{
|
||||
"include": "#parameter-array-binding-pattern"
|
||||
},
|
||||
{
|
||||
"name": "variable.parameter.js",
|
||||
"match": "([_$[:alpha:]][_$[:alnum:]]*)"
|
||||
},
|
||||
{
|
||||
"include": "#variable-initializer"
|
||||
"include": "#parameter-binding-element"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1452,7 +1514,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"parameter-array-binding-element": {
|
||||
"parameter-binding-element": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
@@ -1468,9 +1530,6 @@
|
||||
},
|
||||
{
|
||||
"include": "#variable-initializer"
|
||||
},
|
||||
{
|
||||
"include": "#punctuation-comma"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1525,7 +1584,10 @@
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#parameter-array-binding-element"
|
||||
"include": "#parameter-binding-element"
|
||||
},
|
||||
{
|
||||
"include": "#punctuation-comma"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1685,9 +1747,9 @@
|
||||
},
|
||||
"type-paren-or-function-parameters": {
|
||||
"name": "meta.type.paren.cover.js",
|
||||
"begin": "\\s*(\\()",
|
||||
"begin": "\\(",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"0": {
|
||||
"name": "meta.brace.round.js"
|
||||
}
|
||||
},
|
||||
@@ -1744,7 +1806,7 @@
|
||||
},
|
||||
{
|
||||
"name": "meta.type.function.js",
|
||||
"begin": "(?x)( \\s* (?= [(]\\s*( ([)]) | (\\.\\.\\.) | ([_$[:alnum:]]+\\s*( ([:,?=])| ([)]\\s*=>) )) ) ) )",
|
||||
"begin": "(?x)( (?= [(]\\s*( ([)]) | (\\.\\.\\.) | ([_$[:alnum:]]+\\s*( ([:,?=])| ([)]\\s*=>) )) ) ) )",
|
||||
"end": "(?<=\\))",
|
||||
"patterns": [
|
||||
{
|
||||
@@ -1762,6 +1824,10 @@
|
||||
{
|
||||
"name": "keyword.operator.type.js",
|
||||
"match": "[&|]"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.expression.keyof.js",
|
||||
"match": "(?<!\\.|\\$)\\bkeyof\\b(?!\\$)"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1850,7 +1916,7 @@
|
||||
},
|
||||
"type-parameters": {
|
||||
"name": "meta.type.parameters.js",
|
||||
"begin": "DO_NOT_MATCH",
|
||||
"begin": "(<)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.typeparameters.begin.js"
|
||||
@@ -2167,17 +2233,20 @@
|
||||
]
|
||||
},
|
||||
"function-call": {
|
||||
"begin": "(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.accessor.js"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.function.js"
|
||||
}
|
||||
},
|
||||
"end": "(?<=\\))",
|
||||
"begin": "(?=(\\.\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
|
||||
"end": "(?<=\\))(?!(\\.\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#support-objects"
|
||||
},
|
||||
{
|
||||
"name": "punctuation.accessor.js",
|
||||
"match": "\\."
|
||||
},
|
||||
{
|
||||
"name": "entity.name.function.js",
|
||||
"match": "([_$[:alpha:]][_$[:alnum:]]*)"
|
||||
},
|
||||
{
|
||||
"include": "#comment"
|
||||
},
|
||||
@@ -2303,6 +2372,9 @@
|
||||
{
|
||||
"include": "#paren-expression"
|
||||
},
|
||||
{
|
||||
"include": "#class-or-interface-declaration"
|
||||
},
|
||||
{
|
||||
"include": "#type"
|
||||
}
|
||||
@@ -2318,12 +2390,12 @@
|
||||
},
|
||||
{
|
||||
"name": "meta.object.member.js",
|
||||
"begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[[^\\]]*\\]))\\s*:)",
|
||||
"begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*:)",
|
||||
"end": "(?=,|\\})",
|
||||
"patterns": [
|
||||
{
|
||||
"name": "meta.object-literal.key.js",
|
||||
"begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[[^\\]]*\\]))\\s*:)",
|
||||
"begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*:)",
|
||||
"end": ":",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
@@ -2506,6 +2578,14 @@
|
||||
{
|
||||
"name": "keyword.operator.arithmetic.js",
|
||||
"match": "%|\\*|/|-|\\+"
|
||||
},
|
||||
{
|
||||
"match": "(?<=[_$[:alnum:]])\\s*(/)(?![/*])",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.operator.arithmetic.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -2677,7 +2757,7 @@
|
||||
"patterns": [
|
||||
{
|
||||
"name": "string.regex.js",
|
||||
"begin": "(?<=[=(:,\\[?+!]|return|case|=>|&&|\\|\\||\\*\\/)\\s*(/)(?![/*+?])(?=.*/)",
|
||||
"begin": "(?<=[=(:,\\[?+!]|return|case|=>|&&|\\|\\||\\*\\/)\\s*(/)(?![/*])(?=(?:[^/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+/(?![/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.string.begin.js"
|
||||
@@ -2866,7 +2946,6 @@
|
||||
]
|
||||
},
|
||||
"string": {
|
||||
"name": "string.js",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#qstring-single"
|
||||
@@ -3073,8 +3152,13 @@
|
||||
{
|
||||
"name": "comment.block.documentation.js",
|
||||
"begin": "/\\*\\*(?!/)",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.comment.js"
|
||||
}
|
||||
},
|
||||
"end": "\\*/",
|
||||
"captures": {
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.comment.js"
|
||||
}
|
||||
@@ -3088,8 +3172,13 @@
|
||||
{
|
||||
"name": "comment.block.js",
|
||||
"begin": "/\\*",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.comment.js"
|
||||
}
|
||||
},
|
||||
"end": "\\*/",
|
||||
"captures": {
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.comment.js"
|
||||
}
|
||||
@@ -3118,6 +3207,49 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"directives": {
|
||||
"name": "comment.line.triple-slash.directive.js",
|
||||
"begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|name)\\s*=\\s*((\\'[^']*\\')|(\\\"[^\"]*\\\")))+\\s*/>\\s*$)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.comment.js"
|
||||
}
|
||||
},
|
||||
"end": "(?=$)",
|
||||
"patterns": [
|
||||
{
|
||||
"name": "meta.tag.js",
|
||||
"begin": "(<)(reference|amd-dependency|amd-module)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.directive.js"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.directive.js"
|
||||
}
|
||||
},
|
||||
"end": "/>",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.tag.directive.js"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"name": "entity.other.attribute-name.directive.js",
|
||||
"match": "path|types|no-default-lib|name"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.assignment.js",
|
||||
"match": "="
|
||||
},
|
||||
{
|
||||
"include": "#string"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"docblock": {
|
||||
"patterns": [
|
||||
{
|
||||
@@ -3177,7 +3309,6 @@
|
||||
]
|
||||
},
|
||||
"jsx-tag-attribute-name": {
|
||||
"name": "meta.tag.attribute-name.js",
|
||||
"match": "(?x)\n \\s*\n ([_$a-zA-Z][-$\\w]*)\n (?=\\s|=|/?>|/\\*|//)",
|
||||
"captures": {
|
||||
"1": {
|
||||
@@ -3190,42 +3321,42 @@
|
||||
"match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))"
|
||||
},
|
||||
"jsx-string-double-quoted": {
|
||||
"name": "string.jsxAttributeValue.quoted.double.js",
|
||||
"name": "string.quoted.double.js",
|
||||
"begin": "\"",
|
||||
"end": "\"",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.jsxAttributeValue.begin.js"
|
||||
"name": "punctuation.definition.string.begin.js"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.jsxAttributeValue.end.js"
|
||||
"name": "punctuation.definition.string.end.js"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#jsx-attributeValue-entities"
|
||||
"include": "#jsx-entities"
|
||||
}
|
||||
]
|
||||
},
|
||||
"jsx-string-single-quoted": {
|
||||
"name": "string.jsxAttributeValue.quoted.single.js",
|
||||
"name": "string.quoted.single.js",
|
||||
"begin": "'",
|
||||
"end": "'",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.jsxAttributeValue.begin.js"
|
||||
"name": "punctuation.definition.string.begin.js"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.jsxAttributeValue.end.js"
|
||||
"name": "punctuation.definition.string.end.js"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#jsx-attributeValue-entities"
|
||||
"include": "#jsx-entities"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -3249,26 +3380,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"jsx-attributeValue-entities": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "constant.character.entity.jsxAttributeValue.js",
|
||||
"match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.entity.jsxAttributeValue.js"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.definition.entity.jsxAttributeValue.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "invalid.illegal.bad-ampersand.jsxAttributeValue.js",
|
||||
"match": "&"
|
||||
}
|
||||
]
|
||||
},
|
||||
"jsx-evaluated-code": {
|
||||
"name": "meta.embedded.expression.js",
|
||||
"begin": "{",
|
||||
@@ -3460,5 +3571,5 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/578dd5db70333e3b6826ff529276f32916a2c81b"
|
||||
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/4d0bdebb93aadc25ecbb903ebc897e9cd5fab69c"
|
||||
}
|
||||
Reference in New Issue
Block a user