提交 770beca1 编写于 作者: M Matt Bierner

Update js/ts grammars

上级 ff58f508
......@@ -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/76cfeabda164d2d132222af72e0a5f991e26c51a",
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/444971648e9e1e41c54c62f41d1310f2816965c4",
"name": "JavaScript (with React support)",
"scopeName": "source.js",
"patterns": [
......@@ -690,6 +690,12 @@
{
"include": "#string"
},
{
"include": "#numeric-literal"
},
{
"include": "#regex"
},
{
"include": "#object-binding-pattern"
},
......@@ -712,6 +718,12 @@
{
"include": "#string"
},
{
"include": "#numeric-literal"
},
{
"include": "#regex"
},
{
"include": "#object-binding-pattern-const"
},
......@@ -986,6 +998,12 @@
{
"include": "#string"
},
{
"include": "#numeric-literal"
},
{
"include": "#regex"
},
{
"include": "#parameter-object-binding-pattern"
},
......@@ -2462,8 +2480,8 @@
},
{
"name": "meta.object.member.js meta.object-literal.key.js",
"begin": "(?=[\\'\\\"])",
"end": "(?=:)|((?<=[\\'\\\"])(?=\\s*[\\(\\<]))",
"begin": "(?=[\\'\\\"\\`])",
"end": "(?=:)|((?<=[\\'\\\"\\`])(?=((\\s*[\\(\\<,}])|(\\s+(as)\\s+))))",
"patterns": [
{
"include": "#comment"
......@@ -2473,9 +2491,22 @@
}
]
},
{
"name": "meta.object.member.js meta.object-literal.key.js",
"begin": "(?x)(?=(\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$)))",
"end": "(?=:)|(?=\\s*([\\(\\<,}])|(\\s+as\\s+))",
"patterns": [
{
"include": "#comment"
},
{
"include": "#numeric-literal"
}
]
},
{
"name": "meta.method.declaration.js",
"begin": "(?<=[\\]\\'\\\"])(?=\\s*[\\(\\<])",
"begin": "(?<=[\\]\\'\\\"\\`])(?=\\s*[\\(\\<])",
"end": "(?=\\}|;|,)|(?<=\\})",
"patterns": [
{
......@@ -2540,6 +2571,33 @@
}
}
},
{
"name": "meta.object.member.js",
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*([,}]|$))",
"captures": {
"1": {
"name": "keyword.control.as.js"
},
"2": {
"name": "storage.modifier.js"
}
}
},
{
"name": "meta.object.member.js",
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+",
"beginCaptures": {
"1": {
"name": "keyword.control.as.js"
}
},
"end": "(?=$|^|[,}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+))",
"patterns": [
{
"include": "#type"
}
]
},
{
"name": "meta.object.member.js",
"begin": "(?=[_$[:alpha:]][_$[:alnum:]]*\\s*=)",
......@@ -2958,6 +3016,17 @@
"name": "keyword.operator.expression.void.js",
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))void(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
},
{
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*($|[;,:})\\]]))",
"captures": {
"1": {
"name": "keyword.control.as.js"
},
"2": {
"name": "storage.modifier.js"
}
}
},
{
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+",
"beginCaptures": {
......
......@@ -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/76cfeabda164d2d132222af72e0a5f991e26c51a",
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/444971648e9e1e41c54c62f41d1310f2816965c4",
"name": "JavaScript (with React support)",
"scopeName": "source.js.jsx",
"patterns": [
......@@ -690,6 +690,12 @@
{
"include": "#string"
},
{
"include": "#numeric-literal"
},
{
"include": "#regex"
},
{
"include": "#object-binding-pattern"
},
......@@ -712,6 +718,12 @@
{
"include": "#string"
},
{
"include": "#numeric-literal"
},
{
"include": "#regex"
},
{
"include": "#object-binding-pattern-const"
},
......@@ -986,6 +998,12 @@
{
"include": "#string"
},
{
"include": "#numeric-literal"
},
{
"include": "#regex"
},
{
"include": "#parameter-object-binding-pattern"
},
......@@ -2462,8 +2480,8 @@
},
{
"name": "meta.object.member.js.jsx meta.object-literal.key.js.jsx",
"begin": "(?=[\\'\\\"])",
"end": "(?=:)|((?<=[\\'\\\"])(?=\\s*[\\(\\<]))",
"begin": "(?=[\\'\\\"\\`])",
"end": "(?=:)|((?<=[\\'\\\"\\`])(?=((\\s*[\\(\\<,}])|(\\s+(as)\\s+))))",
"patterns": [
{
"include": "#comment"
......@@ -2473,9 +2491,22 @@
}
]
},
{
"name": "meta.object.member.js.jsx meta.object-literal.key.js.jsx",
"begin": "(?x)(?=(\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$)))",
"end": "(?=:)|(?=\\s*([\\(\\<,}])|(\\s+as\\s+))",
"patterns": [
{
"include": "#comment"
},
{
"include": "#numeric-literal"
}
]
},
{
"name": "meta.method.declaration.js.jsx",
"begin": "(?<=[\\]\\'\\\"])(?=\\s*[\\(\\<])",
"begin": "(?<=[\\]\\'\\\"\\`])(?=\\s*[\\(\\<])",
"end": "(?=\\}|;|,)|(?<=\\})",
"patterns": [
{
......@@ -2540,6 +2571,33 @@
}
}
},
{
"name": "meta.object.member.js.jsx",
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*([,}]|$))",
"captures": {
"1": {
"name": "keyword.control.as.js.jsx"
},
"2": {
"name": "storage.modifier.js.jsx"
}
}
},
{
"name": "meta.object.member.js.jsx",
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+",
"beginCaptures": {
"1": {
"name": "keyword.control.as.js.jsx"
}
},
"end": "(?=$|^|[,}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+))",
"patterns": [
{
"include": "#type"
}
]
},
{
"name": "meta.object.member.js.jsx",
"begin": "(?=[_$[:alpha:]][_$[:alnum:]]*\\s*=)",
......@@ -2958,6 +3016,17 @@
"name": "keyword.operator.expression.void.js.jsx",
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))void(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
},
{
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*($|[;,:})\\]]))",
"captures": {
"1": {
"name": "keyword.control.as.js.jsx"
},
"2": {
"name": "storage.modifier.js.jsx"
}
}
},
{
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+",
"beginCaptures": {
......
......@@ -6,7 +6,7 @@
"git": {
"name": "TypeScript-TmLanguage",
"repositoryUrl": "https://github.com/Microsoft/TypeScript-TmLanguage",
"commitHash": "76cfeabda164d2d132222af72e0a5f991e26c51a"
"commitHash": "444971648e9e1e41c54c62f41d1310f2816965c4"
}
},
"license": "MIT",
......
......@@ -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/76cfeabda164d2d132222af72e0a5f991e26c51a",
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/444971648e9e1e41c54c62f41d1310f2816965c4",
"name": "TypeScript",
"scopeName": "source.ts",
"patterns": [
......@@ -687,6 +687,12 @@
{
"include": "#string"
},
{
"include": "#numeric-literal"
},
{
"include": "#regex"
},
{
"include": "#object-binding-pattern"
},
......@@ -709,6 +715,12 @@
{
"include": "#string"
},
{
"include": "#numeric-literal"
},
{
"include": "#regex"
},
{
"include": "#object-binding-pattern-const"
},
......@@ -983,6 +995,12 @@
{
"include": "#string"
},
{
"include": "#numeric-literal"
},
{
"include": "#regex"
},
{
"include": "#parameter-object-binding-pattern"
},
......@@ -2459,8 +2477,8 @@
},
{
"name": "meta.object.member.ts meta.object-literal.key.ts",
"begin": "(?=[\\'\\\"])",
"end": "(?=:)|((?<=[\\'\\\"])(?=\\s*[\\(\\<]))",
"begin": "(?=[\\'\\\"\\`])",
"end": "(?=:)|((?<=[\\'\\\"\\`])(?=((\\s*[\\(\\<,}])|(\\s+(as)\\s+))))",
"patterns": [
{
"include": "#comment"
......@@ -2470,9 +2488,22 @@
}
]
},
{
"name": "meta.object.member.ts meta.object-literal.key.ts",
"begin": "(?x)(?=(\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$)))",
"end": "(?=:)|(?=\\s*([\\(\\<,}])|(\\s+as\\s+))",
"patterns": [
{
"include": "#comment"
},
{
"include": "#numeric-literal"
}
]
},
{
"name": "meta.method.declaration.ts",
"begin": "(?<=[\\]\\'\\\"])(?=\\s*[\\(\\<])",
"begin": "(?<=[\\]\\'\\\"\\`])(?=\\s*[\\(\\<])",
"end": "(?=\\}|;|,)|(?<=\\})",
"patterns": [
{
......@@ -2537,6 +2568,33 @@
}
}
},
{
"name": "meta.object.member.ts",
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*([,}]|$))",
"captures": {
"1": {
"name": "keyword.control.as.ts"
},
"2": {
"name": "storage.modifier.ts"
}
}
},
{
"name": "meta.object.member.ts",
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+",
"beginCaptures": {
"1": {
"name": "keyword.control.as.ts"
}
},
"end": "(?=$|^|[,}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+))",
"patterns": [
{
"include": "#type"
}
]
},
{
"name": "meta.object.member.ts",
"begin": "(?=[_$[:alpha:]][_$[:alnum:]]*\\s*=)",
......@@ -2887,6 +2945,21 @@
},
"cast": {
"patterns": [
{
"name": "cast.expr.ts",
"match": "\\s*(<)\\s*(const)\\s*(>)",
"captures": {
"1": {
"name": "meta.brace.angle.ts"
},
"2": {
"name": "storage.modifier.ts"
},
"3": {
"name": "meta.brace.angle.ts"
}
}
},
{
"name": "cast.expr.ts",
"begin": "(?:(?<!\\+\\+|--)(?<=^return|[^\\._$[:alnum:]]return|^throw|[^\\._$[:alnum:]]throw|^yield|[^\\._$[:alnum:]]yield|^await|[^\\._$[:alnum:]]await|^default|[^\\._$[:alnum:]]default|[=(,:>*?\\&\\|\\^]|[^_$[:alnum:]](?:\\+\\+|\\-\\-)|[^\\+]\\+|[^\\-]\\-))\\s*(<)(?!<?\\=)(?!\\s*$)",
......@@ -2992,6 +3065,17 @@
"name": "keyword.operator.expression.void.ts",
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))void(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
},
{
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*($|[;,:})\\]]))",
"captures": {
"1": {
"name": "keyword.control.as.ts"
},
"2": {
"name": "storage.modifier.ts"
}
}
},
{
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+",
"beginCaptures": {
......
......@@ -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/76cfeabda164d2d132222af72e0a5f991e26c51a",
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/444971648e9e1e41c54c62f41d1310f2816965c4",
"name": "TypeScriptReact",
"scopeName": "source.tsx",
"patterns": [
......@@ -690,6 +690,12 @@
{
"include": "#string"
},
{
"include": "#numeric-literal"
},
{
"include": "#regex"
},
{
"include": "#object-binding-pattern"
},
......@@ -712,6 +718,12 @@
{
"include": "#string"
},
{
"include": "#numeric-literal"
},
{
"include": "#regex"
},
{
"include": "#object-binding-pattern-const"
},
......@@ -986,6 +998,12 @@
{
"include": "#string"
},
{
"include": "#numeric-literal"
},
{
"include": "#regex"
},
{
"include": "#parameter-object-binding-pattern"
},
......@@ -2462,8 +2480,8 @@
},
{
"name": "meta.object.member.tsx meta.object-literal.key.tsx",
"begin": "(?=[\\'\\\"])",
"end": "(?=:)|((?<=[\\'\\\"])(?=\\s*[\\(\\<]))",
"begin": "(?=[\\'\\\"\\`])",
"end": "(?=:)|((?<=[\\'\\\"\\`])(?=((\\s*[\\(\\<,}])|(\\s+(as)\\s+))))",
"patterns": [
{
"include": "#comment"
......@@ -2473,9 +2491,22 @@
}
]
},
{
"name": "meta.object.member.tsx meta.object-literal.key.tsx",
"begin": "(?x)(?=(\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$)))",
"end": "(?=:)|(?=\\s*([\\(\\<,}])|(\\s+as\\s+))",
"patterns": [
{
"include": "#comment"
},
{
"include": "#numeric-literal"
}
]
},
{
"name": "meta.method.declaration.tsx",
"begin": "(?<=[\\]\\'\\\"])(?=\\s*[\\(\\<])",
"begin": "(?<=[\\]\\'\\\"\\`])(?=\\s*[\\(\\<])",
"end": "(?=\\}|;|,)|(?<=\\})",
"patterns": [
{
......@@ -2540,6 +2571,33 @@
}
}
},
{
"name": "meta.object.member.tsx",
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*([,}]|$))",
"captures": {
"1": {
"name": "keyword.control.as.tsx"
},
"2": {
"name": "storage.modifier.tsx"
}
}
},
{
"name": "meta.object.member.tsx",
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+",
"beginCaptures": {
"1": {
"name": "keyword.control.as.tsx"
}
},
"end": "(?=$|^|[,}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+))",
"patterns": [
{
"include": "#type"
}
]
},
{
"name": "meta.object.member.tsx",
"begin": "(?=[_$[:alpha:]][_$[:alnum:]]*\\s*=)",
......@@ -2958,6 +3016,17 @@
"name": "keyword.operator.expression.void.tsx",
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))void(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
},
{
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*($|[;,:})\\]]))",
"captures": {
"1": {
"name": "keyword.control.as.tsx"
},
"2": {
"name": "storage.modifier.tsx"
}
}
},
{
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+",
"beginCaptures": {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册