mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
Update js/ts grammar
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
|
||||
"Once accepted there, we are happy to receive an update request."
|
||||
],
|
||||
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/3a70fab1b03520774fa236f1f7e7a0939463739f",
|
||||
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/9be58bc51f179fd4119dbd5caaa7693a381a13b5",
|
||||
"name": "TypeScript",
|
||||
"scopeName": "source.ts",
|
||||
"fileTypes": [
|
||||
@@ -200,7 +200,7 @@
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
|
||||
"end": "(?=,|\\})",
|
||||
"patterns": [
|
||||
{
|
||||
@@ -226,7 +226,7 @@
|
||||
]
|
||||
},
|
||||
"object-binding-element-propertyName": {
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
|
||||
"end": "(:)",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
@@ -580,7 +580,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?=((\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))",
|
||||
"begin": "(?=((\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))",
|
||||
"end": "(?=,|\\}|$)",
|
||||
"patterns": [
|
||||
{
|
||||
@@ -1135,20 +1135,20 @@
|
||||
},
|
||||
"field-declaration": {
|
||||
"name": "meta.field.declaration.ts",
|
||||
"begin": "(?<!\\()(?:(?<!\\.|\\$)\\b(readonly)\\s+)?(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
|
||||
"begin": "(?<!\\()(?:(?<!\\.|\\$)\\b(readonly)\\s+)?(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.ts"
|
||||
}
|
||||
},
|
||||
"end": "(?=\\}|;|,|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?<=\\})",
|
||||
"end": "(?=\\}|;|,|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?<=\\})",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#variable-initializer"
|
||||
},
|
||||
{
|
||||
"begin": "(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
|
||||
"end": "(?=[};,=]|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?<=\\})",
|
||||
"begin": "(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:\\'.*\\')|(?:\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
|
||||
"end": "(?=[};,=]|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?<=\\})",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type-annotation"
|
||||
@@ -1182,7 +1182,7 @@
|
||||
"patterns": [
|
||||
{
|
||||
"name": "meta.method.declaration.ts",
|
||||
"begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])",
|
||||
"begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.ts"
|
||||
@@ -1224,7 +1224,7 @@
|
||||
},
|
||||
{
|
||||
"name": "meta.method.declaration.ts",
|
||||
"begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|\\.|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))?\\s*[\\(\\<]))",
|
||||
"begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|\\.|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))?\\s*[\\(\\<]))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.ts"
|
||||
@@ -1270,7 +1270,7 @@
|
||||
]
|
||||
},
|
||||
"method-declaration-name": {
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\<])",
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\<])",
|
||||
"end": "(?=\\(|\\<)",
|
||||
"patterns": [
|
||||
{
|
||||
@@ -1291,7 +1291,7 @@
|
||||
},
|
||||
"object-literal-method-declaration": {
|
||||
"name": "meta.method.declaration.ts",
|
||||
"begin": "(?<!\\.|\\$)(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])",
|
||||
"begin": "(?<!\\.|\\$)(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.async.ts"
|
||||
@@ -1329,7 +1329,7 @@
|
||||
]
|
||||
},
|
||||
"object-literal-method-overload-declaration": {
|
||||
"begin": "(?<!\\.|\\$)(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])",
|
||||
"begin": "(?<!\\.|\\$)(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.async.ts"
|
||||
@@ -1649,7 +1649,7 @@
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
|
||||
"end": "(?=,|\\})",
|
||||
"patterns": [
|
||||
{
|
||||
@@ -1752,20 +1752,46 @@
|
||||
]
|
||||
},
|
||||
"return-type": {
|
||||
"name": "meta.return.type.ts",
|
||||
"begin": "(?<=\\))\\s*(:)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.operator.type.annotation.ts"
|
||||
"patterns": [
|
||||
{
|
||||
"name": "meta.return.type.ts",
|
||||
"begin": "(?<=\\))\\s*(:)(?=\\s*\\S)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.operator.type.annotation.ts"
|
||||
}
|
||||
},
|
||||
"end": "(?<![:|&])(?=$|^|[{};,]|//)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#return-type-core"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "meta.return.type.ts",
|
||||
"begin": "(?<=\\))\\s*(:)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.operator.type.annotation.ts"
|
||||
}
|
||||
},
|
||||
"end": "(?<![:|&])((?=[{};,]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#return-type-core"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"end": "(?<![:|&])(?=$|^|[{};,]|//)",
|
||||
]
|
||||
},
|
||||
"return-type-core": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"begin": "(?<=[:])(?=\\s*\\{)",
|
||||
"begin": "(?<=[:|&])(?=\\s*\\{)",
|
||||
"end": "(?<=\\})",
|
||||
"patterns": [
|
||||
{
|
||||
@@ -1786,20 +1812,36 @@
|
||||
"match": "(?<!\\.|\\$)\\bis\\b(?!\\$|\\.)"
|
||||
},
|
||||
"type-annotation": {
|
||||
"name": "meta.type.annotation.ts",
|
||||
"begin": ":",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "keyword.operator.type.annotation.ts"
|
||||
}
|
||||
},
|
||||
"end": "(?=$|^|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
"name": "meta.type.annotation.ts",
|
||||
"begin": "(:)(?=\\s*\\S)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.operator.type.annotation.ts"
|
||||
}
|
||||
},
|
||||
"end": "(?<![:|&])((?=$|^|[,);\\}\\]]|//)|(?==[^>])|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"include": "#type"
|
||||
"name": "meta.type.annotation.ts",
|
||||
"begin": "(:)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.operator.type.annotation.ts"
|
||||
}
|
||||
},
|
||||
"end": "(?<![:|&])((?=[,);\\}\\]]|//)|(?==[^>])|(?=^\\s*$)|((?<=\\S)(?=\\s*$))|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1989,14 +2031,40 @@
|
||||
]
|
||||
},
|
||||
"type-function-return-type": {
|
||||
"name": "meta.type.function.return.ts",
|
||||
"begin": "=>",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.function.arrow.ts"
|
||||
"patterns": [
|
||||
{
|
||||
"name": "meta.type.function.return.ts",
|
||||
"begin": "(=>)(?=\\s*\\S)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.type.function.arrow.ts"
|
||||
}
|
||||
},
|
||||
"end": "(?<!=>)(?<![|&])(?=[,\\]\\)\\{\\}=;>]|//|$)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type-function-return-type-core"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "meta.type.function.return.ts",
|
||||
"begin": "=>",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.function.arrow.ts"
|
||||
}
|
||||
},
|
||||
"end": "(?<!=>)(?<![|&])((?=[,\\]\\)\\{\\}=;>]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type-function-return-type-core"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"end": "(?<!=>)(?<![|&])(?=[,\\]\\)\\{\\}=;>]|//|$)",
|
||||
]
|
||||
},
|
||||
"type-function-return-type-core": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
@@ -2117,7 +2185,7 @@
|
||||
"name": "keyword.operator.assignment.ts"
|
||||
}
|
||||
},
|
||||
"end": "(?=[,);}\\]])|(?=^\\s*$)|(?<=\\S)(?<!=)",
|
||||
"end": "(?=[,);}\\]])|(?=^\\s*$)|(?<=\\S)(?<!=)(?=\\s*$)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#expression"
|
||||
@@ -2420,6 +2488,10 @@
|
||||
{
|
||||
"include": "#punctuation-accessor"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.expression.import.ts",
|
||||
"match": "(?![\\.\\$])\\bimport(?=\\s*[\\(]\\s*[\\\"\\'\\`])"
|
||||
},
|
||||
{
|
||||
"name": "entity.name.function.ts",
|
||||
"match": "([_$[:alpha:]][_$[:alnum:]]*)"
|
||||
@@ -2613,12 +2685,12 @@
|
||||
},
|
||||
{
|
||||
"name": "meta.object.member.ts",
|
||||
"begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)",
|
||||
"begin": "(?=(?:(?:\\'.*\\')|(?:\\\".*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)",
|
||||
"end": "(?=,|\\})",
|
||||
"patterns": [
|
||||
{
|
||||
"name": "meta.object-literal.key.ts",
|
||||
"begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)",
|
||||
"begin": "(?=(?:(?:\\'.*\\')|(?:\\\".*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)",
|
||||
"end": ":",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
@@ -3460,7 +3532,7 @@
|
||||
},
|
||||
"directives": {
|
||||
"name": "comment.line.triple-slash.directive.ts",
|
||||
"begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|name)\\s*=\\s*((\\'[^']*\\')|(\\\"[^\"]*\\\")))+\\s*/>\\s*$)",
|
||||
"begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|name)\\s*=\\s*((\\'.*\\')|(\\\".*\\\")))+\\s*/>\\s*$)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.comment.ts"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
|
||||
"Once accepted there, we are happy to receive an update request."
|
||||
],
|
||||
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/3a70fab1b03520774fa236f1f7e7a0939463739f",
|
||||
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/9be58bc51f179fd4119dbd5caaa7693a381a13b5",
|
||||
"name": "TypeScriptReact",
|
||||
"scopeName": "source.tsx",
|
||||
"fileTypes": [
|
||||
@@ -200,7 +200,7 @@
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
|
||||
"end": "(?=,|\\})",
|
||||
"patterns": [
|
||||
{
|
||||
@@ -226,7 +226,7 @@
|
||||
]
|
||||
},
|
||||
"object-binding-element-propertyName": {
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
|
||||
"end": "(:)",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
@@ -583,7 +583,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?=((\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))",
|
||||
"begin": "(?=((\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))",
|
||||
"end": "(?=,|\\}|$)",
|
||||
"patterns": [
|
||||
{
|
||||
@@ -1138,20 +1138,20 @@
|
||||
},
|
||||
"field-declaration": {
|
||||
"name": "meta.field.declaration.tsx",
|
||||
"begin": "(?<!\\()(?:(?<!\\.|\\$)\\b(readonly)\\s+)?(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
|
||||
"begin": "(?<!\\()(?:(?<!\\.|\\$)\\b(readonly)\\s+)?(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.tsx"
|
||||
}
|
||||
},
|
||||
"end": "(?=\\}|;|,|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?<=\\})",
|
||||
"end": "(?=\\}|;|,|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?<=\\})",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#variable-initializer"
|
||||
},
|
||||
{
|
||||
"begin": "(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
|
||||
"end": "(?=[};,=]|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?<=\\})",
|
||||
"begin": "(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:\\'.*\\')|(?:\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
|
||||
"end": "(?=[};,=]|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?<=\\})",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type-annotation"
|
||||
@@ -1185,7 +1185,7 @@
|
||||
"patterns": [
|
||||
{
|
||||
"name": "meta.method.declaration.tsx",
|
||||
"begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])",
|
||||
"begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.tsx"
|
||||
@@ -1227,7 +1227,7 @@
|
||||
},
|
||||
{
|
||||
"name": "meta.method.declaration.tsx",
|
||||
"begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|\\.|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))?\\s*[\\(\\<]))",
|
||||
"begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|\\.|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))?\\s*[\\(\\<]))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.tsx"
|
||||
@@ -1273,7 +1273,7 @@
|
||||
]
|
||||
},
|
||||
"method-declaration-name": {
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\<])",
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\<])",
|
||||
"end": "(?=\\(|\\<)",
|
||||
"patterns": [
|
||||
{
|
||||
@@ -1294,7 +1294,7 @@
|
||||
},
|
||||
"object-literal-method-declaration": {
|
||||
"name": "meta.method.declaration.tsx",
|
||||
"begin": "(?<!\\.|\\$)(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])",
|
||||
"begin": "(?<!\\.|\\$)(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.async.tsx"
|
||||
@@ -1332,7 +1332,7 @@
|
||||
]
|
||||
},
|
||||
"object-literal-method-overload-declaration": {
|
||||
"begin": "(?<!\\.|\\$)(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])",
|
||||
"begin": "(?<!\\.|\\$)(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.async.tsx"
|
||||
@@ -1652,7 +1652,7 @@
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
|
||||
"end": "(?=,|\\})",
|
||||
"patterns": [
|
||||
{
|
||||
@@ -1755,20 +1755,46 @@
|
||||
]
|
||||
},
|
||||
"return-type": {
|
||||
"name": "meta.return.type.tsx",
|
||||
"begin": "(?<=\\))\\s*(:)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.operator.type.annotation.tsx"
|
||||
"patterns": [
|
||||
{
|
||||
"name": "meta.return.type.tsx",
|
||||
"begin": "(?<=\\))\\s*(:)(?=\\s*\\S)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.operator.type.annotation.tsx"
|
||||
}
|
||||
},
|
||||
"end": "(?<![:|&])(?=$|^|[{};,]|//)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#return-type-core"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "meta.return.type.tsx",
|
||||
"begin": "(?<=\\))\\s*(:)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.operator.type.annotation.tsx"
|
||||
}
|
||||
},
|
||||
"end": "(?<![:|&])((?=[{};,]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#return-type-core"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"end": "(?<![:|&])(?=$|^|[{};,]|//)",
|
||||
]
|
||||
},
|
||||
"return-type-core": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"begin": "(?<=[:])(?=\\s*\\{)",
|
||||
"begin": "(?<=[:|&])(?=\\s*\\{)",
|
||||
"end": "(?<=\\})",
|
||||
"patterns": [
|
||||
{
|
||||
@@ -1789,20 +1815,36 @@
|
||||
"match": "(?<!\\.|\\$)\\bis\\b(?!\\$|\\.)"
|
||||
},
|
||||
"type-annotation": {
|
||||
"name": "meta.type.annotation.tsx",
|
||||
"begin": ":",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "keyword.operator.type.annotation.tsx"
|
||||
}
|
||||
},
|
||||
"end": "(?=$|^|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
"name": "meta.type.annotation.tsx",
|
||||
"begin": "(:)(?=\\s*\\S)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.operator.type.annotation.tsx"
|
||||
}
|
||||
},
|
||||
"end": "(?<![:|&])((?=$|^|[,);\\}\\]]|//)|(?==[^>])|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"include": "#type"
|
||||
"name": "meta.type.annotation.tsx",
|
||||
"begin": "(:)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.operator.type.annotation.tsx"
|
||||
}
|
||||
},
|
||||
"end": "(?<![:|&])((?=[,);\\}\\]]|//)|(?==[^>])|(?=^\\s*$)|((?<=\\S)(?=\\s*$))|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1992,14 +2034,40 @@
|
||||
]
|
||||
},
|
||||
"type-function-return-type": {
|
||||
"name": "meta.type.function.return.tsx",
|
||||
"begin": "=>",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.function.arrow.tsx"
|
||||
"patterns": [
|
||||
{
|
||||
"name": "meta.type.function.return.tsx",
|
||||
"begin": "(=>)(?=\\s*\\S)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.type.function.arrow.tsx"
|
||||
}
|
||||
},
|
||||
"end": "(?<!=>)(?<![|&])(?=[,\\]\\)\\{\\}=;>]|//|$)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type-function-return-type-core"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "meta.type.function.return.tsx",
|
||||
"begin": "=>",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.function.arrow.tsx"
|
||||
}
|
||||
},
|
||||
"end": "(?<!=>)(?<![|&])((?=[,\\]\\)\\{\\}=;>]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#type-function-return-type-core"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"end": "(?<!=>)(?<![|&])(?=[,\\]\\)\\{\\}=;>]|//|$)",
|
||||
]
|
||||
},
|
||||
"type-function-return-type-core": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
@@ -2120,7 +2188,7 @@
|
||||
"name": "keyword.operator.assignment.tsx"
|
||||
}
|
||||
},
|
||||
"end": "(?=[,);}\\]])|(?=^\\s*$)|(?<=\\S)(?<!=)",
|
||||
"end": "(?=[,);}\\]])|(?=^\\s*$)|(?<=\\S)(?<!=)(?=\\s*$)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#expression"
|
||||
@@ -2423,6 +2491,10 @@
|
||||
{
|
||||
"include": "#punctuation-accessor"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.expression.import.tsx",
|
||||
"match": "(?![\\.\\$])\\bimport(?=\\s*[\\(]\\s*[\\\"\\'\\`])"
|
||||
},
|
||||
{
|
||||
"name": "entity.name.function.tsx",
|
||||
"match": "([_$[:alpha:]][_$[:alnum:]]*)"
|
||||
@@ -2579,12 +2651,12 @@
|
||||
},
|
||||
{
|
||||
"name": "meta.object.member.tsx",
|
||||
"begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)",
|
||||
"begin": "(?=(?:(?:\\'.*\\')|(?:\\\".*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)",
|
||||
"end": "(?=,|\\})",
|
||||
"patterns": [
|
||||
{
|
||||
"name": "meta.object-literal.key.tsx",
|
||||
"begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)",
|
||||
"begin": "(?=(?:(?:\\'.*\\')|(?:\\\".*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)",
|
||||
"end": ":",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
@@ -3426,7 +3498,7 @@
|
||||
},
|
||||
"directives": {
|
||||
"name": "comment.line.triple-slash.directive.tsx",
|
||||
"begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|name)\\s*=\\s*((\\'[^']*\\')|(\\\"[^\"]*\\\")))+\\s*/>\\s*$)",
|
||||
"begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|name)\\s*=\\s*((\\'.*\\')|(\\\".*\\\")))+\\s*/>\\s*$)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.comment.tsx"
|
||||
|
||||
Reference in New Issue
Block a user