Update js/ts grammars

This commit is contained in:
Matt Bierner
2020-01-06 11:44:57 -08:00
parent af9dddd0fc
commit 9536692355
5 changed files with 141 additions and 9 deletions

View File

@@ -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/c9c955af17ed0c86ebce32e0f26c72f0a2925937",
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/b7ef0941e38d56292d19ee7706a558dbff6c3a35",
"name": "JavaScript (with React support)",
"scopeName": "source.js",
"patterns": [
@@ -1825,7 +1825,7 @@
},
"access-modifier": {
"name": "storage.modifier.js",
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|public|protected|private|readonly|static|declare)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
},
"property-accessor": {
"name": "storage.type.property.js",
@@ -2755,6 +2755,39 @@
}
]
},
{
"begin": "(?<=:)\\s*(async)?\\s*(?=\\<\\s*$)",
"beginCaptures": {
"1": {
"name": "storage.modifier.async.js"
}
},
"end": "(?<=\\>)",
"patterns": [
{
"include": "#type-parameters"
}
]
},
{
"begin": "(?<=\\>)\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
"beginCaptures": {
"1": {
"name": "meta.brace.round.js"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "meta.brace.round.js"
}
},
"patterns": [
{
"include": "#expression-inside-possibly-arrow-parens"
}
]
},
{
"include": "#possibly-arrow-return-type"
},