mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
Update 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/9be58bc51f179fd4119dbd5caaa7693a381a13b5",
|
||||
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/648a036db2bad78ee93463269ec49ed91ee5aa91",
|
||||
"name": "JavaScript (with React support)",
|
||||
"scopeName": "source.js",
|
||||
"fileTypes": [
|
||||
@@ -103,7 +103,7 @@
|
||||
"patterns": [
|
||||
{
|
||||
"name": "meta.var-single-variable.expr.js",
|
||||
"begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n (=\\s*(\n ((async\\s+)?(\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)",
|
||||
"begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n (=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "meta.definition.variable.js entity.name.function.js"
|
||||
@@ -203,7 +203,7 @@
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
|
||||
"end": "(?=,|\\})",
|
||||
"patterns": [
|
||||
{
|
||||
@@ -229,7 +229,7 @@
|
||||
]
|
||||
},
|
||||
"object-binding-element-propertyName": {
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
|
||||
"end": "(:)",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
@@ -366,7 +366,7 @@
|
||||
"include": "#function-expression"
|
||||
},
|
||||
{
|
||||
"include": "#class-or-interface-declaration"
|
||||
"include": "#class-expression"
|
||||
},
|
||||
{
|
||||
"include": "#arrow-function"
|
||||
@@ -457,7 +457,10 @@
|
||||
"include": "#function-declaration"
|
||||
},
|
||||
{
|
||||
"include": "#class-or-interface-declaration"
|
||||
"include": "#class-declaration"
|
||||
},
|
||||
{
|
||||
"include": "#interface-declaration"
|
||||
},
|
||||
{
|
||||
"include": "#type-declaration"
|
||||
@@ -508,7 +511,7 @@
|
||||
"name": "entity.name.type.alias.js"
|
||||
}
|
||||
},
|
||||
"end": "(?=[};]|\\bvar\\b|\\blet\\b|\\bconst\\b|\\btype\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\bnamespace\\b|\\bmodule\\b|\\bimport\\b|\\benum\\b|\\bdeclare\\b|\\bexport\\b|\\babstract\\b|\\basync\\b)",
|
||||
"end": "(?=[};]|\\babstract\\b|\\basync\\b|\\bclass\\b|\\bconst\\b|\\bdeclare\\b|\\benum\\b|\\bexport\\b|\\bfunction\\b|\\bimport\\b|\\binterface\\b|\\blet\\b|\\bmodule\\b|\\bnamespace\\b|\\btype\\b|\\bvar\\b)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
@@ -586,7 +589,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?=((\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))",
|
||||
"begin": "(?=((\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))",
|
||||
"end": "(?=,|\\}|$)",
|
||||
"patterns": [
|
||||
{
|
||||
@@ -621,7 +624,7 @@
|
||||
"name": "storage.type.namespace.js"
|
||||
}
|
||||
},
|
||||
"end": "(?<=\\})",
|
||||
"end": "(?<=\\})|(?=;|\\babstract\\b|\\basync\\b|\\bclass\\b|\\bconst\\b|\\bdeclare\\b|\\benum\\b|\\bexport\\b|\\bfunction\\b|\\bimport\\b|\\binterface\\b|\\blet\\b|\\bmodule\\b|\\bnamespace\\b|\\btype\\b|\\bvar\\b)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
@@ -698,7 +701,7 @@
|
||||
"name": "keyword.operator.assignment.js"
|
||||
}
|
||||
},
|
||||
"end": "(?=;|$)",
|
||||
"end": "(?=;|$|^)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
@@ -733,7 +736,7 @@
|
||||
"name": "keyword.control.import.js"
|
||||
}
|
||||
},
|
||||
"end": "(?=;|$)",
|
||||
"end": "(?=;|$|^)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#import-export-declaration"
|
||||
@@ -773,7 +776,7 @@
|
||||
"name": "keyword.control.default.js"
|
||||
}
|
||||
},
|
||||
"end": "(?=;|\\bexport\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|\\bimport\\b|\\benum\\b|\\bnamespace\\b|\\bmodule\\b|\\btype\\b|\\babstract\\b|\\bdeclare\\b|\\basync\\b|$)",
|
||||
"end": "(?=;|$|\\babstract\\b|\\basync\\b|\\bclass\\b|\\bconst\\b|\\bdeclare\\b|\\benum\\b|\\bexport\\b|\\bfunction\\b|\\bimport\\b|\\binterface\\b|\\blet\\b|\\bmodule\\b|\\bnamespace\\b|\\btype\\b|\\bvar\\b)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#expression"
|
||||
@@ -788,7 +791,7 @@
|
||||
"name": "keyword.control.export.js"
|
||||
}
|
||||
},
|
||||
"end": "(?=;|\\bexport\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|\\bimport\\b|\\benum\\b|\\bnamespace\\b|\\bmodule\\b|\\btype\\b|\\babstract\\b|\\bdeclare\\b|\\basync\\b|$)",
|
||||
"end": "(?=;|$|\\babstract\\b|\\basync\\b|\\bclass\\b|\\bconst\\b|\\bdeclare\\b|\\benum\\b|\\bexport\\b|\\bfunction\\b|\\bimport\\b|\\binterface\\b|\\blet\\b|\\bmodule\\b|\\bnamespace\\b|\\btype\\b|\\bvar\\b)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#import-export-declaration"
|
||||
@@ -883,93 +886,101 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"class-or-interface-declaration": {
|
||||
"class-declaration": {
|
||||
"name": "meta.class.js",
|
||||
"begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(class)\\b(?=\\s+|/[/*])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.control.export.js"
|
||||
},
|
||||
"2": {
|
||||
"name": "storage.modifier.js"
|
||||
},
|
||||
"3": {
|
||||
"name": "storage.type.class.js"
|
||||
}
|
||||
},
|
||||
"end": "(?<=\\})",
|
||||
"patterns": [
|
||||
{
|
||||
"name": "meta.class.js",
|
||||
"begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(class)\\b(?=\\s+|/[/*])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.control.export.js"
|
||||
},
|
||||
"2": {
|
||||
"name": "storage.modifier.js"
|
||||
},
|
||||
"3": {
|
||||
"name": "storage.type.class.js"
|
||||
}
|
||||
},
|
||||
"end": "(?<=\\})",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.block.js"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"include": "#class-or-interface-heritage"
|
||||
},
|
||||
{
|
||||
"match": "[_$[:alpha:]][_$[:alnum:]]*",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "entity.name.type.class.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"include": "#type-parameters"
|
||||
},
|
||||
{
|
||||
"include": "#class-or-interface-body"
|
||||
}
|
||||
]
|
||||
"include": "#class-declaration-or-expression-patterns"
|
||||
}
|
||||
]
|
||||
},
|
||||
"class-declaration-or-expression-patterns": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"name": "meta.interface.js",
|
||||
"begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(interface)\\b(?=\\s+|/[/*])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.control.export.js"
|
||||
},
|
||||
"2": {
|
||||
"name": "storage.modifier.js"
|
||||
},
|
||||
"3": {
|
||||
"name": "storage.type.interface.js"
|
||||
"include": "#class-or-interface-heritage"
|
||||
},
|
||||
{
|
||||
"match": "[_$[:alpha:]][_$[:alnum:]]*",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "entity.name.type.class.js"
|
||||
}
|
||||
},
|
||||
"end": "(?<=\\})",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.block.js"
|
||||
}
|
||||
},
|
||||
{
|
||||
"include": "#type-parameters"
|
||||
},
|
||||
{
|
||||
"include": "#class-or-interface-body"
|
||||
}
|
||||
]
|
||||
},
|
||||
"interface-declaration": {
|
||||
"name": "meta.interface.js",
|
||||
"begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(interface)\\b(?=\\s+|/[/*])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.control.export.js"
|
||||
},
|
||||
"2": {
|
||||
"name": "storage.modifier.js"
|
||||
},
|
||||
"3": {
|
||||
"name": "storage.type.interface.js"
|
||||
}
|
||||
},
|
||||
"end": "(?<=\\})",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"include": "#class-or-interface-heritage"
|
||||
},
|
||||
{
|
||||
"match": "[_$[:alpha:]][_$[:alnum:]]*",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "entity.name.type.interface.js"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"include": "#class-or-interface-heritage"
|
||||
},
|
||||
{
|
||||
"match": "[_$[:alpha:]][_$[:alnum:]]*",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "entity.name.type.interface.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"include": "#type-parameters"
|
||||
},
|
||||
{
|
||||
"include": "#class-or-interface-body"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"include": "#type-parameters"
|
||||
},
|
||||
{
|
||||
"include": "#class-or-interface-body"
|
||||
}
|
||||
]
|
||||
},
|
||||
"class-expression": {
|
||||
"name": "meta.class.js",
|
||||
"begin": "(?<!\\.|\\$)\\b(class)\\b(?=\\s+|[<{]|/[/*])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.type.class.js"
|
||||
}
|
||||
},
|
||||
"end": "(?<=\\})",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#class-declaration-or-expression-patterns"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1141,20 +1152,20 @@
|
||||
},
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"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"
|
||||
@@ -1170,7 +1181,7 @@
|
||||
},
|
||||
{
|
||||
"name": "meta.definition.property.js entity.name.function.js",
|
||||
"match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n (=\\s*(\n ((async\\s+)?(\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)"
|
||||
"match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n (=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)"
|
||||
},
|
||||
{
|
||||
"name": "meta.definition.property.js variable.object.property.js",
|
||||
@@ -1188,7 +1199,7 @@
|
||||
"patterns": [
|
||||
{
|
||||
"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*[\\(\\<])",
|
||||
"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"
|
||||
@@ -1230,7 +1241,7 @@
|
||||
},
|
||||
{
|
||||
"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*[\\(\\<]))",
|
||||
"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"
|
||||
@@ -1276,7 +1287,7 @@
|
||||
]
|
||||
},
|
||||
"method-declaration-name": {
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\<])",
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\<])",
|
||||
"end": "(?=\\(|\\<)",
|
||||
"patterns": [
|
||||
{
|
||||
@@ -1297,7 +1308,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"
|
||||
@@ -1335,7 +1346,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"
|
||||
@@ -1561,7 +1572,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=\\s*\n (=\\s*(\n ((async\\s+)?(\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)",
|
||||
"match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=\\s*\n (=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.js"
|
||||
@@ -1655,7 +1666,7 @@
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'.*\\')|(\\\".*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
|
||||
"end": "(?=,|\\})",
|
||||
"patterns": [
|
||||
{
|
||||
@@ -2541,7 +2552,7 @@
|
||||
"include": "#object-identifiers"
|
||||
},
|
||||
{
|
||||
"match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n))",
|
||||
"match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n))",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.accessor.js"
|
||||
@@ -2631,13 +2642,13 @@
|
||||
"name": "keyword.operator.new.js"
|
||||
}
|
||||
},
|
||||
"end": "(?<=\\))|(?=[;),}]|$|((?<!\\.|\\$)\\bnew\\b(?!\\$|\\.))|((?<!\\.|\\$)\\bfunction((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
|
||||
"end": "(?<=\\))|(?=[;),}\\]]|$|((?<!\\.|\\$)\\bnew\\b(?!\\$|\\.))|((?<!\\.|\\$)\\bfunction((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#paren-expression"
|
||||
},
|
||||
{
|
||||
"include": "#class-or-interface-declaration"
|
||||
"include": "#class-declaration"
|
||||
},
|
||||
{
|
||||
"include": "#type"
|
||||
@@ -2653,92 +2664,58 @@
|
||||
"include": "#object-literal-method-declaration"
|
||||
},
|
||||
{
|
||||
"name": "meta.object.member.js",
|
||||
"begin": "(?=(?:(?:\\'.*\\')|(?:\\\".*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)",
|
||||
"end": "(?=,|\\})",
|
||||
"name": "meta.object.member.js meta.object-literal.key.js",
|
||||
"begin": "(?=\\[)",
|
||||
"end": "(?=:)",
|
||||
"patterns": [
|
||||
{
|
||||
"name": "meta.object-literal.key.js",
|
||||
"begin": "(?=(?:(?:\\'.*\\')|(?:\\\".*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)",
|
||||
"end": ":",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.separator.key-value.js"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#string"
|
||||
},
|
||||
{
|
||||
"include": "#array-literal"
|
||||
}
|
||||
]
|
||||
},
|
||||
"include": "#array-literal"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "meta.object.member.js meta.object-literal.key.js",
|
||||
"begin": "(?=[\\'\\\"])",
|
||||
"end": "(?=:)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#expression"
|
||||
"include": "#string"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "meta.object.member.js",
|
||||
"begin": "(?![_$[:alpha:]])([[:digit:]]+)\\s*(:)",
|
||||
"beginCaptures": {
|
||||
"match": "(?![_$[:alpha:]])([[:digit:]]+)\\s*(?=:)",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "meta.object-literal.key.js"
|
||||
},
|
||||
"1": {
|
||||
"name": "constant.numeric.decimal.js"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.separator.key-value.js"
|
||||
}
|
||||
},
|
||||
"end": "(?=,|\\})",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#expression"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "meta.object.member.js",
|
||||
"begin": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)(?=\\s*(\n ((async\\s+)?(\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n)))",
|
||||
"beginCaptures": {
|
||||
"match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n)))",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "meta.object-literal.key.js"
|
||||
},
|
||||
"1": {
|
||||
"name": "entity.name.function.js"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.separator.key-value.js"
|
||||
}
|
||||
},
|
||||
"end": "(?=,|\\})",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#expression"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "meta.object.member.js",
|
||||
"begin": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(:)",
|
||||
"beginCaptures": {
|
||||
"match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "meta.object-literal.key.js"
|
||||
},
|
||||
"1": {
|
||||
"name": "punctuation.separator.key-value.js"
|
||||
}
|
||||
},
|
||||
"end": "(?=,|\\})",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#expression"
|
||||
}
|
||||
]
|
||||
"end": "(?=,|\\})"
|
||||
},
|
||||
{
|
||||
"name": "meta.object.member.js",
|
||||
@@ -2764,11 +2741,29 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"include": "#object-member-body"
|
||||
},
|
||||
{
|
||||
"include": "#punctuation-comma"
|
||||
}
|
||||
]
|
||||
},
|
||||
"object-member-body": {
|
||||
"name": "meta.object.member.js",
|
||||
"begin": ":",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "meta.object-literal.key.js punctuation.separator.key-value.js"
|
||||
}
|
||||
},
|
||||
"end": "(?=,|\\})",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#expression"
|
||||
}
|
||||
]
|
||||
},
|
||||
"expression-operators": {
|
||||
"patterns": [
|
||||
{
|
||||
@@ -3194,7 +3189,7 @@
|
||||
"patterns": [
|
||||
{
|
||||
"name": "constant.other.character-class.range.regexp",
|
||||
"match": "(?:.|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))",
|
||||
"match": "(?:.|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "constant.character.numeric.regexp"
|
||||
@@ -3234,7 +3229,7 @@
|
||||
},
|
||||
{
|
||||
"name": "constant.character.numeric.regexp",
|
||||
"match": "\\\\([0-7]{3}|x\\h\\h|u\\h\\h\\h\\h)"
|
||||
"match": "\\\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})"
|
||||
},
|
||||
{
|
||||
"name": "constant.character.control.regexp",
|
||||
@@ -3284,7 +3279,7 @@
|
||||
},
|
||||
"string-character-escape": {
|
||||
"name": "constant.character.escape.js",
|
||||
"match": "\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)"
|
||||
"match": "\\\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)"
|
||||
},
|
||||
"template-substitution-element": {
|
||||
"name": "meta.template.expression.js",
|
||||
@@ -3471,10 +3466,16 @@
|
||||
},
|
||||
{
|
||||
"name": "comment.block.js",
|
||||
"begin": "/\\*",
|
||||
"begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.comment.js"
|
||||
},
|
||||
"2": {
|
||||
"name": "storage.type.internaldeclaration.js"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.decorator.internaldeclaration.js"
|
||||
}
|
||||
},
|
||||
"end": "\\*/",
|
||||
@@ -3485,13 +3486,22 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"begin": "(^[ \\t]+)?(//)",
|
||||
"begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.whitespace.comment.leading.js"
|
||||
},
|
||||
"2": {
|
||||
"name": "comment.line.double-slash.js punctuation.definition.comment.js"
|
||||
"name": "comment.line.double-slash.js"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.definition.comment.js"
|
||||
},
|
||||
"4": {
|
||||
"name": "storage.type.internaldeclaration.js"
|
||||
},
|
||||
"5": {
|
||||
"name": "punctuation.decorator.internaldeclaration.js"
|
||||
}
|
||||
},
|
||||
"end": "(?=^)",
|
||||
@@ -3501,7 +3511,7 @@
|
||||
},
|
||||
"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*$)",
|
||||
"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"
|
||||
@@ -3545,7 +3555,7 @@
|
||||
"docblock": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(?x)\n((@)access)\n\\s+\n(private|protected|public)\n\\b",
|
||||
"match": "(?x)\n((@)(?:access|api))\n\\s+\n(private|protected|public)\n\\b",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "storage.type.class.jsdoc"
|
||||
@@ -3669,7 +3679,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "(?x)\n((@)see)\n\\s+\n(?:\n # URL\n (\n (?=https?://)\n (?:[^\\s*]|\\*[^/])+\n )\n |\n # JSDoc namepath\n (\n (?!https?://)\n (?:[^@\\s*/]|\\*[^/])+\n )\n)",
|
||||
"match": "(?x)\n((@)see)\n\\s+\n(?:\n # URL\n (\n (?!\n # Avoid matching bare URIs (also acceptable as links)\n https?://\n |\n # Avoid matching {@inline tags}; we match those below\n (?:\\[[^\\[\\]]*\\])? # Possible description [preceding]{@tag}\n {@(?:link|linkcode|linkplain|tutorial)\\b\n )\n # Matched namepath\n (?:[^\\s*]|\\*[^/])+\n )\n |\n # JSDoc namepath\n (\n (?!https?://)\n (?:[^@\\s*/]|\\*[^/])+\n )\n)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "storage.type.class.jsdoc"
|
||||
@@ -3761,6 +3771,24 @@
|
||||
},
|
||||
{
|
||||
"name": "variable.other.jsdoc",
|
||||
"match": "(?x)\n(\\[)\\s*\n[\\w$]+\n(?:\n (?:\\[\\])? # Foo[ ].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [\\w$]+\n)*\n(?:\n \\s*\n (=) # [foo=bar] Default parameter value\n \\s*\n (\n # The inner regexes are to stop the match early at */ and to not stop at escaped quotes\n (?:\n \"(?:(?:\\*(?!/))|(?:\\\\(?!\"))|[^*\\\\])*?\" | # [foo=\"bar\"] Double-quoted\n '(?:(?:\\*(?!/))|(?:\\\\(?!'))|[^*\\\\])*?' | # [foo='bar'] Single-quoted\n \\[ (?:(?:\\*(?!/))|[^*])*? \\] | # [foo=[1,2]] Array literal\n (?:(?:\\*(?!/))|[^*])*? # Everything else\n )*\n )\n)?\n\\s*(?:(\\])((?:[^*\\s]|\\*[^\\s/])+)?|(?=\\*/))",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.optional-value.begin.bracket.square.jsdoc"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.assignment.jsdoc"
|
||||
},
|
||||
"3": {
|
||||
"name": "source.embedded.js"
|
||||
},
|
||||
"4": {
|
||||
"name": "punctuation.definition.optional-value.end.bracket.square.jsdoc"
|
||||
},
|
||||
"5": {
|
||||
"name": "invalid.illegal.syntax.jsdoc"
|
||||
}
|
||||
},
|
||||
"begin": "\\[",
|
||||
"end": "\\]|(?=\\*/)",
|
||||
"patterns": [
|
||||
@@ -3859,7 +3887,7 @@
|
||||
},
|
||||
{
|
||||
"name": "storage.type.class.jsdoc",
|
||||
"match": "(?x) (@) (?:abstract|access|alias|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|global|host|ignore|implements|implicitCast|inherit[Dd]oc|inner|instance|interface|kind |lends|license|listens|main|member|memberof!?|method|mixes|mixins?|modifies|module|name|namespace |noalias|nocollapse|nocompile|nosideeffects|override|overview|package|param|preserve|private|prop |property|protected|public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule |summary|suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce) \\b",
|
||||
"match": "(?x) (@) (?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|global|host|ignore|implements|implicitCast|inherit[Dd]oc|inner|instance|interface |internal|kind|lends|license|listens|main|member|memberof!?|method|mixes|mixins?|modifies|module |name|namespace|noalias|nocollapse|nocompile|nosideeffects|override|overview|package|param|preserve |private|prop|property|protected|public|read[Oo]nly|record|require[ds]|returns?|see|since|static |struct|submodule|summary|suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted |uses|var|variation|version|virtual|writeOnce) \\b",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.block.tag.jsdoc"
|
||||
@@ -4125,6 +4153,15 @@
|
||||
"name": "invalid.illegal.attribute.js",
|
||||
"match": "\\S+"
|
||||
},
|
||||
"jsx-tag-without-attributes-in-expression": {
|
||||
"begin": "(?x)\n (?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\Wreturn|^return|\\Wdefault|^)\\s*\n (?=(<)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\\s*(>))",
|
||||
"end": "(?!\\s*(<)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\\s*(>))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#jsx-tag-without-attributes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"jsx-tag-without-attributes": {
|
||||
"name": "meta.tag.without-attributes.js",
|
||||
"begin": "(<)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\\s*(>)",
|
||||
@@ -4165,7 +4202,7 @@
|
||||
]
|
||||
},
|
||||
"jsx-tag-in-expression": {
|
||||
"begin": "(?x)\n (?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\Wreturn|^return|\\Wdefault|^)\\s*\n (?!(<)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>)) #look ahead is not start of tag without attributes\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
|
||||
"begin": "(?x)\n (?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\Wreturn|^return|\\Wdefault|^)\\s*\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
|
||||
"end": "(/>)|(?:(</)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\\s*(>))",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
@@ -4296,7 +4333,7 @@
|
||||
"jsx": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#jsx-tag-without-attributes"
|
||||
"include": "#jsx-tag-without-attributes-in-expression"
|
||||
},
|
||||
{
|
||||
"include": "#jsx-tag-in-expression"
|
||||
|
||||
Reference in New Issue
Block a user