Update grammars

This commit is contained in:
Alex Ross
2022-05-02 11:18:54 +02:00
parent 85e3f0d973
commit f3b1b53443
14 changed files with 116 additions and 44 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/56b7270f094b036256774702e3b7f96490981190",
"version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/4d30ff834ec324f56291addd197aa1e423cedfdd",
"name": "JavaScript (with React support)",
"scopeName": "source.js",
"patterns": [
@@ -3993,10 +3993,10 @@
"include": "#type-object"
},
{
"include": "#type-conditional"
"include": "#type-operators"
},
{
"include": "#type-operators"
"include": "#type-conditional"
},
{
"include": "#type-fn-type-parameters"
@@ -4344,6 +4344,9 @@
{
"include": "#typeof-operator"
},
{
"include": "#type-infer"
},
{
"begin": "([&|])(?=\\s*\\{)",
"beginCaptures": {
@@ -4375,16 +4378,31 @@
"name": "keyword.operator.ternary.js",
"match": "(\\?|\\:)"
},
{
"name": "keyword.operator.expression.infer.js",
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))infer(?=\\s+[_$[:alpha:]])"
},
{
"name": "keyword.operator.expression.import.js",
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*\\()"
}
]
},
"type-infer": {
"patterns": [
{
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(infer)\\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s+(extends)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))?",
"name": "meta.type.infer.js",
"captures": {
"1": {
"name": "keyword.operator.expression.infer.js"
},
"2": {
"name": "entity.name.type.js"
},
"3": {
"name": "keyword.operator.expression.extends.js"
}
}
}
]
},
"type-predicate-operator": {
"patterns": [
{