Update grammars (#151383)

Updates the markdown and JS/TS grammars
This commit is contained in:
Matt Bierner
2022-06-07 09:37:14 -07:00
committed by GitHub
parent 7c22caad55
commit 9f3cafba7d
7 changed files with 181 additions and 34 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.", "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." "Once accepted there, we are happy to receive an update request."
], ],
"version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/4d30ff834ec324f56291addd197aa1e423cedfdd", "version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/0dfae8cc4807fecfbf8f1add095d9817df824c95",
"name": "JavaScript (with React support)", "name": "JavaScript (with React support)",
"scopeName": "source.js", "scopeName": "source.js",
"patterns": [ "patterns": [
@@ -2271,11 +2271,47 @@
"name": "keyword.control.from.js", "name": "keyword.control.from.js",
"match": "\\bfrom\\b" "match": "\\bfrom\\b"
}, },
{
"include": "#import-export-assert-clause"
},
{ {
"include": "#import-export-clause" "include": "#import-export-clause"
} }
] ]
}, },
"import-export-assert-clause": {
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(assert)\\s*(\\{)",
"beginCaptures": {
"1": {
"name": "keyword.control.assert.js"
},
"2": {
"name": "punctuation.definition.block.js"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.definition.block.js"
}
},
"patterns": [
{
"include": "#comment"
},
{
"include": "#string"
},
{
"name": "meta.object-literal.key.js",
"match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)"
},
{
"name": "punctuation.separator.key-value.js",
"match": ":"
}
]
},
"import-export-block": { "import-export-block": {
"name": "meta.block.js", "name": "meta.block.js",
"begin": "\\{", "begin": "\\{",
@@ -3914,7 +3950,7 @@
}, },
{ {
"name": "storage.modifier.js", "name": "storage.modifier.js",
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
}, },
{ {
"include": "#type" "include": "#type"
@@ -5064,7 +5100,7 @@
}, },
"directives": { "directives": {
"name": "comment.line.triple-slash.directive.js", "name": "comment.line.triple-slash.directive.js",
"begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)", "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name|resolution-mode)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)",
"beginCaptures": { "beginCaptures": {
"1": { "1": {
"name": "punctuation.definition.comment.js" "name": "punctuation.definition.comment.js"
@@ -5092,7 +5128,7 @@
"patterns": [ "patterns": [
{ {
"name": "entity.other.attribute-name.directive.js", "name": "entity.other.attribute-name.directive.js",
"match": "path|types|no-default-lib|lib|name" "match": "path|types|no-default-lib|lib|name|resolution-mode"
}, },
{ {
"name": "keyword.operator.assignment.js", "name": "keyword.operator.assignment.js",

View File

@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.", "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." "Once accepted there, we are happy to receive an update request."
], ],
"version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/4d30ff834ec324f56291addd197aa1e423cedfdd", "version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/0dfae8cc4807fecfbf8f1add095d9817df824c95",
"name": "JavaScript (with React support)", "name": "JavaScript (with React support)",
"scopeName": "source.js.jsx", "scopeName": "source.js.jsx",
"patterns": [ "patterns": [
@@ -2271,11 +2271,47 @@
"name": "keyword.control.from.js.jsx", "name": "keyword.control.from.js.jsx",
"match": "\\bfrom\\b" "match": "\\bfrom\\b"
}, },
{
"include": "#import-export-assert-clause"
},
{ {
"include": "#import-export-clause" "include": "#import-export-clause"
} }
] ]
}, },
"import-export-assert-clause": {
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(assert)\\s*(\\{)",
"beginCaptures": {
"1": {
"name": "keyword.control.assert.js.jsx"
},
"2": {
"name": "punctuation.definition.block.js.jsx"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.definition.block.js.jsx"
}
},
"patterns": [
{
"include": "#comment"
},
{
"include": "#string"
},
{
"name": "meta.object-literal.key.js.jsx",
"match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)"
},
{
"name": "punctuation.separator.key-value.js.jsx",
"match": ":"
}
]
},
"import-export-block": { "import-export-block": {
"name": "meta.block.js.jsx", "name": "meta.block.js.jsx",
"begin": "\\{", "begin": "\\{",
@@ -3914,7 +3950,7 @@
}, },
{ {
"name": "storage.modifier.js.jsx", "name": "storage.modifier.js.jsx",
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
}, },
{ {
"include": "#type" "include": "#type"
@@ -5064,7 +5100,7 @@
}, },
"directives": { "directives": {
"name": "comment.line.triple-slash.directive.js.jsx", "name": "comment.line.triple-slash.directive.js.jsx",
"begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)", "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name|resolution-mode)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)",
"beginCaptures": { "beginCaptures": {
"1": { "1": {
"name": "punctuation.definition.comment.js.jsx" "name": "punctuation.definition.comment.js.jsx"
@@ -5092,7 +5128,7 @@
"patterns": [ "patterns": [
{ {
"name": "entity.other.attribute-name.directive.js.jsx", "name": "entity.other.attribute-name.directive.js.jsx",
"match": "path|types|no-default-lib|lib|name" "match": "path|types|no-default-lib|lib|name|resolution-mode"
}, },
{ {
"name": "keyword.operator.assignment.js.jsx", "name": "keyword.operator.assignment.js.jsx",

View File

@@ -33,7 +33,7 @@
"git": { "git": {
"name": "microsoft/vscode-markdown-tm-grammar", "name": "microsoft/vscode-markdown-tm-grammar",
"repositoryUrl": "https://github.com/microsoft/vscode-markdown-tm-grammar", "repositoryUrl": "https://github.com/microsoft/vscode-markdown-tm-grammar",
"commitHash": "09c3e715102d08bba4c4ea828634474fc58b6f57" "commitHash": "69d3321b4923ca2d5e8e900018887cc38b5fe04a"
} }
}, },
"license": "MIT", "license": "MIT",

View File

@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.", "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." "Once accepted there, we are happy to receive an update request."
], ],
"version": "https://github.com/microsoft/vscode-markdown-tm-grammar/commit/09c3e715102d08bba4c4ea828634474fc58b6f57", "version": "https://github.com/microsoft/vscode-markdown-tm-grammar/commit/69d3321b4923ca2d5e8e900018887cc38b5fe04a",
"name": "Markdown", "name": "Markdown",
"scopeName": "text.html.markdown", "scopeName": "text.html.markdown",
"patterns": [ "patterns": [
@@ -2774,47 +2774,50 @@
"5": { "5": {
"name": "punctuation.definition.metadata.markdown" "name": "punctuation.definition.metadata.markdown"
}, },
"6": { "7": {
"name": "punctuation.definition.link.markdown" "name": "punctuation.definition.link.markdown"
}, },
"7": { "8": {
"name": "markup.underline.link.markdown" "name": "markup.underline.link.markdown"
}, },
"9": { "9": {
"name": "punctuation.definition.link.markdown" "name": "punctuation.definition.link.markdown"
}, },
"10": { "10": {
"name": "string.other.link.description.title.markdown" "name": "markup.underline.link.markdown"
},
"11": {
"name": "punctuation.definition.string.begin.markdown"
}, },
"12": { "12": {
"name": "punctuation.definition.string.end.markdown" "name": "string.other.link.description.title.markdown"
}, },
"13": { "13": {
"name": "string.other.link.description.title.markdown" "name": "punctuation.definition.string.begin.markdown"
}, },
"14": { "14": {
"name": "punctuation.definition.string.begin.markdown" "name": "punctuation.definition.string.end.markdown"
}, },
"15": { "15": {
"name": "punctuation.definition.string.end.markdown"
},
"16": {
"name": "string.other.link.description.title.markdown" "name": "string.other.link.description.title.markdown"
}, },
"17": { "16": {
"name": "punctuation.definition.string.begin.markdown" "name": "punctuation.definition.string.begin.markdown"
}, },
"18": { "17": {
"name": "punctuation.definition.string.end.markdown" "name": "punctuation.definition.string.end.markdown"
}, },
"18": {
"name": "string.other.link.description.title.markdown"
},
"19": { "19": {
"name": "punctuation.definition.string.begin.markdown"
},
"20": {
"name": "punctuation.definition.string.end.markdown"
},
"21": {
"name": "punctuation.definition.metadata.markdown" "name": "punctuation.definition.metadata.markdown"
} }
}, },
"match": "(?x)\n (\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])\n # Match the link text.\n (\\() # Opening paren for url\n (<?)((?<url>(?>[^\\s()]+)|\\(\\g<url>*\\))*)(>?) # The url\n [ \\t]* # Optional whitespace\n (?:\n ((\\().+?(\\))) # Match title in parens…\n | ((\").+?(\")) # or in double quotes…\n | ((').+?(')) # or in single quotes.\n )? # Title is optional\n \\s* # Optional whitespace\n (\\))\n", "match": "(?x)\n (\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])\n # Match the link text.\n (\\() # Opening paren for url\n # The url\n [ \\t]*\n (\n (<)([^<>\\n]*)(>)\n | ((?<url>(?>[^\\s()]+)|\\(\\g<url>*\\))*)\n )\n [ \\t]*\n # The title \n (?:\n ((\\()[^()]*(\\))) # Match title in parens…\n | ((\")[^\"]*(\")) # or in double quotes…\n | ((')[^']*(')) # or in single quotes.\n )? # Title is optional\n \\s* # Optional whitespace\n (\\))\n",
"name": "meta.link.inline.markdown" "name": "meta.link.inline.markdown"
}, },
"link-ref": { "link-ref": {

View File

@@ -6,7 +6,7 @@
"git": { "git": {
"name": "TypeScript-TmLanguage", "name": "TypeScript-TmLanguage",
"repositoryUrl": "https://github.com/microsoft/TypeScript-TmLanguage", "repositoryUrl": "https://github.com/microsoft/TypeScript-TmLanguage",
"commitHash": "4d30ff834ec324f56291addd197aa1e423cedfdd" "commitHash": "0dfae8cc4807fecfbf8f1add095d9817df824c95"
} }
}, },
"license": "MIT", "license": "MIT",

View File

@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.", "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." "Once accepted there, we are happy to receive an update request."
], ],
"version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/4d30ff834ec324f56291addd197aa1e423cedfdd", "version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/0dfae8cc4807fecfbf8f1add095d9817df824c95",
"name": "TypeScript", "name": "TypeScript",
"scopeName": "source.ts", "scopeName": "source.ts",
"patterns": [ "patterns": [
@@ -2268,11 +2268,47 @@
"name": "keyword.control.from.ts", "name": "keyword.control.from.ts",
"match": "\\bfrom\\b" "match": "\\bfrom\\b"
}, },
{
"include": "#import-export-assert-clause"
},
{ {
"include": "#import-export-clause" "include": "#import-export-clause"
} }
] ]
}, },
"import-export-assert-clause": {
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(assert)\\s*(\\{)",
"beginCaptures": {
"1": {
"name": "keyword.control.assert.ts"
},
"2": {
"name": "punctuation.definition.block.ts"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.definition.block.ts"
}
},
"patterns": [
{
"include": "#comment"
},
{
"include": "#string"
},
{
"name": "meta.object-literal.key.ts",
"match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)"
},
{
"name": "punctuation.separator.key-value.ts",
"match": ":"
}
]
},
"import-export-block": { "import-export-block": {
"name": "meta.block.ts", "name": "meta.block.ts",
"begin": "\\{", "begin": "\\{",
@@ -3963,7 +3999,7 @@
}, },
{ {
"name": "storage.modifier.ts", "name": "storage.modifier.ts",
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
}, },
{ {
"include": "#type" "include": "#type"
@@ -5113,7 +5149,7 @@
}, },
"directives": { "directives": {
"name": "comment.line.triple-slash.directive.ts", "name": "comment.line.triple-slash.directive.ts",
"begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)", "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name|resolution-mode)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)",
"beginCaptures": { "beginCaptures": {
"1": { "1": {
"name": "punctuation.definition.comment.ts" "name": "punctuation.definition.comment.ts"
@@ -5141,7 +5177,7 @@
"patterns": [ "patterns": [
{ {
"name": "entity.other.attribute-name.directive.ts", "name": "entity.other.attribute-name.directive.ts",
"match": "path|types|no-default-lib|lib|name" "match": "path|types|no-default-lib|lib|name|resolution-mode"
}, },
{ {
"name": "keyword.operator.assignment.ts", "name": "keyword.operator.assignment.ts",

View File

@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.", "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." "Once accepted there, we are happy to receive an update request."
], ],
"version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/4d30ff834ec324f56291addd197aa1e423cedfdd", "version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/0dfae8cc4807fecfbf8f1add095d9817df824c95",
"name": "TypeScriptReact", "name": "TypeScriptReact",
"scopeName": "source.tsx", "scopeName": "source.tsx",
"patterns": [ "patterns": [
@@ -2271,11 +2271,47 @@
"name": "keyword.control.from.tsx", "name": "keyword.control.from.tsx",
"match": "\\bfrom\\b" "match": "\\bfrom\\b"
}, },
{
"include": "#import-export-assert-clause"
},
{ {
"include": "#import-export-clause" "include": "#import-export-clause"
} }
] ]
}, },
"import-export-assert-clause": {
"begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(assert)\\s*(\\{)",
"beginCaptures": {
"1": {
"name": "keyword.control.assert.tsx"
},
"2": {
"name": "punctuation.definition.block.tsx"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.definition.block.tsx"
}
},
"patterns": [
{
"include": "#comment"
},
{
"include": "#string"
},
{
"name": "meta.object-literal.key.tsx",
"match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)"
},
{
"name": "punctuation.separator.key-value.tsx",
"match": ":"
}
]
},
"import-export-block": { "import-export-block": {
"name": "meta.block.tsx", "name": "meta.block.tsx",
"begin": "\\{", "begin": "\\{",
@@ -3914,7 +3950,7 @@
}, },
{ {
"name": "storage.modifier.tsx", "name": "storage.modifier.tsx",
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
}, },
{ {
"include": "#type" "include": "#type"
@@ -5064,7 +5100,7 @@
}, },
"directives": { "directives": {
"name": "comment.line.triple-slash.directive.tsx", "name": "comment.line.triple-slash.directive.tsx",
"begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)", "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name|resolution-mode)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)",
"beginCaptures": { "beginCaptures": {
"1": { "1": {
"name": "punctuation.definition.comment.tsx" "name": "punctuation.definition.comment.tsx"
@@ -5092,7 +5128,7 @@
"patterns": [ "patterns": [
{ {
"name": "entity.other.attribute-name.directive.tsx", "name": "entity.other.attribute-name.directive.tsx",
"match": "path|types|no-default-lib|lib|name" "match": "path|types|no-default-lib|lib|name|resolution-mode"
}, },
{ {
"name": "keyword.operator.assignment.tsx", "name": "keyword.operator.assignment.tsx",