提交 da45ae99 编写于 作者: M Martin Aeschlimann

[typescript] update grammar

上级 1913a5ce
......@@ -74,7 +74,7 @@
"name": "storage.type.js"
}
},
"end": "(?=$|;|}|(\\s+(of|in)\\s+))",
"end": "(?=$|^|;|}|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#destructuring-variable"
......@@ -103,7 +103,7 @@
"name": "meta.definition.variable.js entity.name.function.js"
}
},
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#var-single-variable-type-annotation"
......@@ -118,7 +118,7 @@
"name": "meta.definition.variable.js variable.other.constant.js"
}
},
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#var-single-variable-type-annotation"
......@@ -133,7 +133,7 @@
"name": "meta.definition.variable.js variable.other.readwrite.js"
}
},
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#var-single-variable-type-annotation"
......@@ -160,7 +160,7 @@
{
"name": "meta.object-binding-pattern-variable.js",
"begin": "(?<!=|:|of|in)\\s*(?=\\{)",
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#object-binding-pattern"
......@@ -176,7 +176,7 @@
{
"name": "meta.array-binding-pattern-variable.js",
"begin": "(?<!=|:|of|in)\\s*(?=\\[)",
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#array-binding-pattern"
......@@ -1141,14 +1141,14 @@
"name": "storage.modifier.js"
}
},
"end": "(?=\\}|;|,|$)|(?<=\\})",
"end": "(?=\\}|;|,|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?<=\\})",
"patterns": [
{
"include": "#variable-initializer"
},
{
"begin": "(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
"end": "(?=[};,=]|$)|(?<=\\})",
"end": "(?=[};,=]|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?<=\\})",
"patterns": [
{
"include": "#type-annotation"
......@@ -1179,50 +1179,93 @@
]
},
"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*[\\(\\<]))",
"beginCaptures": {
"1": {
"name": "storage.modifier.js"
},
"2": {
"name": "storage.modifier.js"
},
"3": {
"name": "storage.modifier.async.js"
},
"4": {
"name": "storage.type.property.js"
},
"5": {
"name": "keyword.operator.new.js"
},
"6": {
"name": "storage.type.js"
},
"7": {
"name": "keyword.generator.asterisk.js"
}
},
"end": "(?=\\}|;|,|$)|(?<=\\})",
"patterns": [
{
"include": "#method-declaration-name"
},
{
"include": "#comment"
},
{
"include": "#type-parameters"
},
{
"include": "#function-parameters"
},
{
"include": "#return-type"
"name": "meta.method.declaration.js",
"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.js"
},
"2": {
"name": "storage.modifier.js"
},
"3": {
"name": "storage.modifier.async.js"
},
"4": {
"name": "storage.type.property.js"
},
"5": {
"name": "keyword.generator.asterisk.js"
}
},
"end": "(?=\\}|;|,|$)|(?<=\\})",
"patterns": [
{
"include": "#method-declaration-name"
},
{
"include": "#comment"
},
{
"include": "#type-parameters"
},
{
"include": "#function-parameters"
},
{
"include": "#return-type"
},
{
"include": "#decl-block"
}
]
},
{
"include": "#decl-block"
"name": "meta.method.declaration.js",
"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.js"
},
"2": {
"name": "storage.modifier.js"
},
"3": {
"name": "storage.modifier.async.js"
},
"4": {
"name": "keyword.operator.new.js"
},
"5": {
"name": "storage.type.js"
},
"6": {
"name": "keyword.generator.asterisk.js"
}
},
"end": "(?=\\}|;|,|$)|(?<=\\})",
"patterns": [
{
"include": "#method-declaration-name"
},
{
"include": "#comment"
},
{
"include": "#type-parameters"
},
{
"include": "#function-parameters"
},
{
"include": "#return-type"
},
{
"include": "#decl-block"
}
]
}
]
},
......@@ -1248,7 +1291,7 @@
},
"object-literal-method-declaration": {
"name": "meta.method.declaration.js",
"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.js"
......@@ -1286,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.js"
......@@ -1386,7 +1429,7 @@
"name": "meta.definition.function.js entity.name.function.js"
}
},
"end": "(?=$|;)|(?<=\\})",
"end": "(?=$|^|;)|(?<=\\})",
"patterns": [
{
"include": "#comment"
......@@ -1710,7 +1753,7 @@
"name": "keyword.operator.type.annotation.js"
}
},
"end": "(?<![:|&])((?=$)|(?=[{};,]|//))",
"end": "(?<![:|&])(?=$|^|[{};,]|//)",
"patterns": [
{
"include": "#comment"
......@@ -1744,7 +1787,7 @@
"name": "keyword.operator.type.annotation.js"
}
},
"end": "(?=$|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)",
"end": "(?=$|^|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)",
"patterns": [
{
"include": "#comment"
......@@ -2019,7 +2062,7 @@
"name": "punctuation.definition.typeparameters.begin.js"
}
},
"end": "(?=$)|(>)",
"end": "(>)",
"endCaptures": {
"1": {
"name": "punctuation.definition.typeparameters.end.js"
......@@ -2054,7 +2097,7 @@
"name": "keyword.operator.assignment.js"
}
},
"end": "(?=$|[,);}\\]])",
"end": "(?=$|^|[,);}\\]])",
"patterns": [
{
"include": "#expression"
......@@ -2693,7 +2736,7 @@
"name": "keyword.control.as.js"
}
},
"end": "(?=$|[;,:})\\]])",
"end": "(?=$|^|[;,:})\\]])",
"patterns": [
{
"include": "#type"
......@@ -2778,7 +2821,7 @@
},
{
"name": "meta.arrow.js",
"begin": "(?x) (?:\n (?<!\\.|\\$)(\\basync)\n)? ((?<![})\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\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)",
"begin": "(?x) (?:\n (?<!\\.|\\$)(\\basync)\n)? ((?<![})!\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\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"
......@@ -3358,25 +3401,17 @@
}
},
{
"begin": "(^[ \\t]+)?(?=//)",
"begin": "(^[ \\t]+)?(//)",
"beginCaptures": {
"1": {
"name": "punctuation.whitespace.comment.leading.js"
},
"2": {
"name": "comment.line.double-slash.js punctuation.definition.comment.js"
}
},
"end": "(?=$)",
"patterns": [
{
"name": "comment.line.double-slash.js",
"begin": "//",
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.js"
}
},
"end": "(?=$)"
}
]
"end": "(?=^)",
"contentName": "comment.line.double-slash.tsx"
}
]
},
......@@ -3388,7 +3423,7 @@
"name": "punctuation.definition.comment.js"
}
},
"end": "(?=$)",
"end": "(?=^)",
"patterns": [
{
"name": "meta.tag.js",
......@@ -4188,5 +4223,5 @@
]
}
},
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/cb1af7953db224204607cbe22d3a45aa0f77a4c1"
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/8c967fe7553297bfad672b7417d78e357c8fe724"
}
\ No newline at end of file
......@@ -529,7 +529,7 @@
},
{
"c": " Prevent following the link.",
"t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.js",
"t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.tsx",
"r": {
"dark_plus": "comment: #608B4E",
"light_plus": "comment: #008000",
......@@ -628,7 +628,7 @@
},
{
"c": " Invert the chosen default.",
"t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.js",
"t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.tsx",
"r": {
"dark_plus": "comment: #608B4E",
"light_plus": "comment: #008000",
......@@ -661,7 +661,7 @@
},
{
"c": " This will trigger an intelligent re-render of the component.",
"t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.js",
"t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.tsx",
"r": {
"dark_plus": "comment: #608B4E",
"light_plus": "comment: #008000",
......@@ -1046,7 +1046,7 @@
},
{
"c": " Default to the default message.",
"t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.js",
"t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.tsx",
"r": {
"dark_plus": "comment: #608B4E",
"light_plus": "comment: #008000",
......@@ -1222,7 +1222,7 @@
},
{
"c": " If toggled, show the alternate message.",
"t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.js",
"t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.tsx",
"r": {
"dark_plus": "comment: #608B4E",
"light_plus": "comment: #008000",
......
......@@ -71,7 +71,7 @@
"name": "storage.type.ts"
}
},
"end": "(?=$|;|}|(\\s+(of|in)\\s+))",
"end": "(?=$|^|;|}|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#destructuring-variable"
......@@ -100,7 +100,7 @@
"name": "meta.definition.variable.ts entity.name.function.ts"
}
},
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#var-single-variable-type-annotation"
......@@ -115,7 +115,7 @@
"name": "meta.definition.variable.ts variable.other.constant.ts"
}
},
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#var-single-variable-type-annotation"
......@@ -130,7 +130,7 @@
"name": "meta.definition.variable.ts variable.other.readwrite.ts"
}
},
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#var-single-variable-type-annotation"
......@@ -157,7 +157,7 @@
{
"name": "meta.object-binding-pattern-variable.ts",
"begin": "(?<!=|:|of|in)\\s*(?=\\{)",
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#object-binding-pattern"
......@@ -173,7 +173,7 @@
{
"name": "meta.array-binding-pattern-variable.ts",
"begin": "(?<!=|:|of|in)\\s*(?=\\[)",
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#array-binding-pattern"
......@@ -1135,14 +1135,14 @@
"name": "storage.modifier.ts"
}
},
"end": "(?=\\}|;|,|$)|(?<=\\})",
"end": "(?=\\}|;|,|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?<=\\})",
"patterns": [
{
"include": "#variable-initializer"
},
{
"begin": "(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
"end": "(?=[};,=]|$)|(?<=\\})",
"end": "(?=[};,=]|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?<=\\})",
"patterns": [
{
"include": "#type-annotation"
......@@ -1173,50 +1173,93 @@
]
},
"method-declaration": {
"name": "meta.method.declaration.ts",
"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.ts"
},
"2": {
"name": "storage.modifier.ts"
},
"3": {
"name": "storage.modifier.async.ts"
},
"4": {
"name": "storage.type.property.ts"
},
"5": {
"name": "keyword.operator.new.ts"
},
"6": {
"name": "storage.type.ts"
},
"7": {
"name": "keyword.generator.asterisk.ts"
}
},
"end": "(?=\\}|;|,|$)|(?<=\\})",
"patterns": [
{
"include": "#method-declaration-name"
},
{
"include": "#comment"
},
{
"include": "#type-parameters"
},
{
"include": "#function-parameters"
},
{
"include": "#return-type"
"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*[\\(\\<])",
"beginCaptures": {
"1": {
"name": "storage.modifier.ts"
},
"2": {
"name": "storage.modifier.ts"
},
"3": {
"name": "storage.modifier.async.ts"
},
"4": {
"name": "storage.type.property.ts"
},
"5": {
"name": "keyword.generator.asterisk.ts"
}
},
"end": "(?=\\}|;|,|$)|(?<=\\})",
"patterns": [
{
"include": "#method-declaration-name"
},
{
"include": "#comment"
},
{
"include": "#type-parameters"
},
{
"include": "#function-parameters"
},
{
"include": "#return-type"
},
{
"include": "#decl-block"
}
]
},
{
"include": "#decl-block"
"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*[\\(\\<]))",
"beginCaptures": {
"1": {
"name": "storage.modifier.ts"
},
"2": {
"name": "storage.modifier.ts"
},
"3": {
"name": "storage.modifier.async.ts"
},
"4": {
"name": "keyword.operator.new.ts"
},
"5": {
"name": "storage.type.ts"
},
"6": {
"name": "keyword.generator.asterisk.ts"
}
},
"end": "(?=\\}|;|,|$)|(?<=\\})",
"patterns": [
{
"include": "#method-declaration-name"
},
{
"include": "#comment"
},
{
"include": "#type-parameters"
},
{
"include": "#function-parameters"
},
{
"include": "#return-type"
},
{
"include": "#decl-block"
}
]
}
]
},
......@@ -1242,7 +1285,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"
......@@ -1280,7 +1323,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"
......@@ -1380,7 +1423,7 @@
"name": "meta.definition.function.ts entity.name.function.ts"
}
},
"end": "(?=$|;)|(?<=\\})",
"end": "(?=$|^|;)|(?<=\\})",
"patterns": [
{
"include": "#comment"
......@@ -1704,7 +1747,7 @@
"name": "keyword.operator.type.annotation.ts"
}
},
"end": "(?<![:|&])((?=$)|(?=[{};,]|//))",
"end": "(?<![:|&])(?=$|^|[{};,]|//)",
"patterns": [
{
"include": "#comment"
......@@ -1738,7 +1781,7 @@
"name": "keyword.operator.type.annotation.ts"
}
},
"end": "(?=$|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)",
"end": "(?=$|^|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)",
"patterns": [
{
"include": "#comment"
......@@ -2013,7 +2056,7 @@
"name": "punctuation.definition.typeparameters.begin.ts"
}
},
"end": "(?=$)|(>)",
"end": "(>)",
"endCaptures": {
"1": {
"name": "punctuation.definition.typeparameters.end.ts"
......@@ -2048,7 +2091,7 @@
"name": "keyword.operator.assignment.ts"
}
},
"end": "(?=$|[,);}\\]])",
"end": "(?=$|^|[,);}\\]])",
"patterns": [
{
"include": "#expression"
......@@ -2487,7 +2530,7 @@
"patterns": [
{
"name": "cast.expr.ts",
"begin": "(?:(?<=return|throw|yield|await|default|[=(,:>*]))\\s*(<)(?!<?\\=)",
"begin": "(?:(?<=return|throw|yield|await|default|[=(,:>*?]))\\s*(<)(?!<?\\=)",
"beginCaptures": {
"1": {
"name": "meta.brace.angle.ts"
......@@ -2724,7 +2767,7 @@
"name": "keyword.control.as.ts"
}
},
"end": "(?=$|[;,:})\\]])",
"end": "(?=$|^|[;,:})\\]])",
"patterns": [
{
"include": "#type"
......@@ -2809,7 +2852,7 @@
},
{
"name": "meta.arrow.ts",
"begin": "(?x) (?:\n (?<!\\.|\\$)(\\basync)\n)? ((?<![})\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\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)",
"begin": "(?x) (?:\n (?<!\\.|\\$)(\\basync)\n)? ((?<![})!\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\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"
......@@ -3389,25 +3432,17 @@
}
},
{
"begin": "(^[ \\t]+)?(?=//)",
"begin": "(^[ \\t]+)?(//)",
"beginCaptures": {
"1": {
"name": "punctuation.whitespace.comment.leading.ts"
},
"2": {
"name": "comment.line.double-slash.ts punctuation.definition.comment.ts"
}
},
"end": "(?=$)",
"patterns": [
{
"name": "comment.line.double-slash.ts",
"begin": "//",
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.ts"
}
},
"end": "(?=$)"
}
]
"end": "(?=^)",
"contentName": "comment.line.double-slash.ts"
}
]
},
......@@ -3419,7 +3454,7 @@
"name": "punctuation.definition.comment.ts"
}
},
"end": "(?=$)",
"end": "(?=^)",
"patterns": [
{
"name": "meta.tag.ts",
......@@ -3923,5 +3958,5 @@
]
}
},
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/9f6676aa2ddb75cb5a9dbe1f59024069e839d986"
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/8c967fe7553297bfad672b7417d78e357c8fe724"
}
\ No newline at end of file
......@@ -71,7 +71,7 @@
"name": "storage.type.tsx"
}
},
"end": "(?=$|;|}|(\\s+(of|in)\\s+))",
"end": "(?=$|^|;|}|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#destructuring-variable"
......@@ -100,7 +100,7 @@
"name": "meta.definition.variable.tsx entity.name.function.tsx"
}
},
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#var-single-variable-type-annotation"
......@@ -115,7 +115,7 @@
"name": "meta.definition.variable.tsx variable.other.constant.tsx"
}
},
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#var-single-variable-type-annotation"
......@@ -130,7 +130,7 @@
"name": "meta.definition.variable.tsx variable.other.readwrite.tsx"
}
},
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#var-single-variable-type-annotation"
......@@ -157,7 +157,7 @@
{
"name": "meta.object-binding-pattern-variable.tsx",
"begin": "(?<!=|:|of|in)\\s*(?=\\{)",
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#object-binding-pattern"
......@@ -173,7 +173,7 @@
{
"name": "meta.array-binding-pattern-variable.tsx",
"begin": "(?<!=|:|of|in)\\s*(?=\\[)",
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#array-binding-pattern"
......@@ -1138,14 +1138,14 @@
"name": "storage.modifier.tsx"
}
},
"end": "(?=\\}|;|,|$)|(?<=\\})",
"end": "(?=\\}|;|,|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?<=\\})",
"patterns": [
{
"include": "#variable-initializer"
},
{
"begin": "(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
"end": "(?=[};,=]|$)|(?<=\\})",
"end": "(?=[};,=]|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?<=\\})",
"patterns": [
{
"include": "#type-annotation"
......@@ -1176,50 +1176,93 @@
]
},
"method-declaration": {
"name": "meta.method.declaration.tsx",
"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.tsx"
},
"2": {
"name": "storage.modifier.tsx"
},
"3": {
"name": "storage.modifier.async.tsx"
},
"4": {
"name": "storage.type.property.tsx"
},
"5": {
"name": "keyword.operator.new.tsx"
},
"6": {
"name": "storage.type.tsx"
},
"7": {
"name": "keyword.generator.asterisk.tsx"
}
},
"end": "(?=\\}|;|,|$)|(?<=\\})",
"patterns": [
{
"include": "#method-declaration-name"
},
{
"include": "#comment"
},
{
"include": "#type-parameters"
},
{
"include": "#function-parameters"
},
{
"include": "#return-type"
"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*[\\(\\<])",
"beginCaptures": {
"1": {
"name": "storage.modifier.tsx"
},
"2": {
"name": "storage.modifier.tsx"
},
"3": {
"name": "storage.modifier.async.tsx"
},
"4": {
"name": "storage.type.property.tsx"
},
"5": {
"name": "keyword.generator.asterisk.tsx"
}
},
"end": "(?=\\}|;|,|$)|(?<=\\})",
"patterns": [
{
"include": "#method-declaration-name"
},
{
"include": "#comment"
},
{
"include": "#type-parameters"
},
{
"include": "#function-parameters"
},
{
"include": "#return-type"
},
{
"include": "#decl-block"
}
]
},
{
"include": "#decl-block"
"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*[\\(\\<]))",
"beginCaptures": {
"1": {
"name": "storage.modifier.tsx"
},
"2": {
"name": "storage.modifier.tsx"
},
"3": {
"name": "storage.modifier.async.tsx"
},
"4": {
"name": "keyword.operator.new.tsx"
},
"5": {
"name": "storage.type.tsx"
},
"6": {
"name": "keyword.generator.asterisk.tsx"
}
},
"end": "(?=\\}|;|,|$)|(?<=\\})",
"patterns": [
{
"include": "#method-declaration-name"
},
{
"include": "#comment"
},
{
"include": "#type-parameters"
},
{
"include": "#function-parameters"
},
{
"include": "#return-type"
},
{
"include": "#decl-block"
}
]
}
]
},
......@@ -1245,7 +1288,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"
......@@ -1283,7 +1326,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"
......@@ -1383,7 +1426,7 @@
"name": "meta.definition.function.tsx entity.name.function.tsx"
}
},
"end": "(?=$|;)|(?<=\\})",
"end": "(?=$|^|;)|(?<=\\})",
"patterns": [
{
"include": "#comment"
......@@ -1707,7 +1750,7 @@
"name": "keyword.operator.type.annotation.tsx"
}
},
"end": "(?<![:|&])((?=$)|(?=[{};,]|//))",
"end": "(?<![:|&])(?=$|^|[{};,]|//)",
"patterns": [
{
"include": "#comment"
......@@ -1741,7 +1784,7 @@
"name": "keyword.operator.type.annotation.tsx"
}
},
"end": "(?=$|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)",
"end": "(?=$|^|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)",
"patterns": [
{
"include": "#comment"
......@@ -2016,7 +2059,7 @@
"name": "punctuation.definition.typeparameters.begin.tsx"
}
},
"end": "(?=$)|(>)",
"end": "(>)",
"endCaptures": {
"1": {
"name": "punctuation.definition.typeparameters.end.tsx"
......@@ -2051,7 +2094,7 @@
"name": "keyword.operator.assignment.tsx"
}
},
"end": "(?=$|[,);}\\]])",
"end": "(?=$|^|[,);}\\]])",
"patterns": [
{
"include": "#expression"
......@@ -2690,7 +2733,7 @@
"name": "keyword.control.as.tsx"
}
},
"end": "(?=$|[;,:})\\]])",
"end": "(?=$|^|[;,:})\\]])",
"patterns": [
{
"include": "#type"
......@@ -2775,7 +2818,7 @@
},
{
"name": "meta.arrow.tsx",
"begin": "(?x) (?:\n (?<!\\.|\\$)(\\basync)\n)? ((?<![})\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\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)",
"begin": "(?x) (?:\n (?<!\\.|\\$)(\\basync)\n)? ((?<![})!\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\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"
......@@ -3355,25 +3398,17 @@
}
},
{
"begin": "(^[ \\t]+)?(?=//)",
"begin": "(^[ \\t]+)?(//)",
"beginCaptures": {
"1": {
"name": "punctuation.whitespace.comment.leading.tsx"
},
"2": {
"name": "comment.line.double-slash.tsx punctuation.definition.comment.tsx"
}
},
"end": "(?=$)",
"patterns": [
{
"name": "comment.line.double-slash.tsx",
"begin": "//",
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.tsx"
}
},
"end": "(?=$)"
}
]
"end": "(?=^)",
"contentName": "comment.line.double-slash.tsx"
}
]
},
......@@ -3385,7 +3420,7 @@
"name": "punctuation.definition.comment.tsx"
}
},
"end": "(?=$)",
"end": "(?=^)",
"patterns": [
{
"name": "meta.tag.tsx",
......@@ -4185,5 +4220,5 @@
]
}
},
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/cb1af7953db224204607cbe22d3a45aa0f77a4c1"
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/8c967fe7553297bfad672b7417d78e357c8fe724"
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册