Update TextMate grammars from upstream sources (#286560)

* Update TextMate grammars from upstream sources
* Fix integration test on Windows to run TypeScript file directly
* Baseline update
This commit is contained in:
Dmitriy Vasyura
2026-01-08 17:24:04 +01:00
committed by GitHub
parent 16ccd1afc5
commit c8fdd1650c
20 changed files with 565 additions and 86 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/dotnet/razor/commit/9b1e979b6c3fe7cfbe30f595b9b0994d20bd482c",
"version": "https://github.com/dotnet/razor/commit/743f32a68c61809b22fd84e8748c3686ef1bb8b8",
"name": "ASP.NET Razor",
"scopeName": "text.html.cshtml",
"injections": {
@@ -27,6 +27,13 @@
"include": "#implicit-expression"
}
]
},
"source.cs": {
"patterns": [
{
"include": "#inline-template"
}
]
}
},
"patterns": [
@@ -129,6 +136,9 @@
{
"include": "#text-tag"
},
{
"include": "#inline-template"
},
{
"include": "#wellformed-html"
},
@@ -183,6 +193,111 @@
}
}
},
"inline-template": {
"patterns": [
{
"include": "#inline-template-void-tag"
},
{
"include": "#inline-template-non-void-tag"
}
]
},
"inline-template-void-tag": {
"name": "meta.tag.structure.$4.void.html",
"begin": "(?i)(@)(<)(!)?(area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)(?=\\s|/?>)",
"beginCaptures": {
"1": {
"patterns": [
{
"include": "#transition"
}
]
},
"2": {
"name": "punctuation.definition.tag.begin.html"
},
"3": {
"name": "constant.character.escape.razor.tagHelperOptOut"
},
"4": {
"name": "entity.name.tag.html"
}
},
"patterns": [
{
"include": "#razor-control-structures"
},
{
"include": "text.html.derivative"
}
],
"end": "/?>",
"endCaptures": {
"0": {
"name": "punctuation.definition.tag.end.html"
}
}
},
"inline-template-non-void-tag": {
"begin": "(@)(<)(!)?([^/\\s>]+)(?=\\s|/?>)",
"beginCaptures": {
"1": {
"patterns": [
{
"include": "#transition"
}
]
},
"2": {
"name": "punctuation.definition.tag.begin.html"
},
"3": {
"name": "constant.character.escape.razor.tagHelperOptOut"
},
"4": {
"name": "entity.name.tag.html"
}
},
"end": "(</)(\\4)\\s*(>)|(/>)",
"endCaptures": {
"1": {
"name": "punctuation.definition.tag.begin.html"
},
"2": {
"name": "entity.name.tag.html"
},
"3": {
"name": "punctuation.definition.tag.end.html"
},
"4": {
"name": "punctuation.definition.tag.end.html"
}
},
"patterns": [
{
"begin": "(?<=>)(?!$)",
"end": "(?=</)",
"patterns": [
{
"include": "#inline-template"
},
{
"include": "#wellformed-html"
},
{
"include": "#razor-control-structures"
}
]
},
{
"include": "#razor-control-structures"
},
{
"include": "text.html.derivative"
}
]
},
"razor-comment": {
"name": "meta.comment.razor",
"begin": "(@)(\\*)",
@@ -1185,7 +1300,7 @@
"include": "#razor-codeblock-body"
}
],
"end": "(?<=})"
"end": "(?<=})|(?<=;)|(?=^\\s*\\})"
},
"using-statement-with-optional-transition": {
"name": "meta.statement.using.razor",
@@ -1213,7 +1328,7 @@
"include": "#razor-codeblock-body"
}
],
"end": "(?<=})"
"end": "(?<=})|(?<=;)|(?=^\\s*\\})"
},
"if-statement": {
"name": "meta.statement.if.razor",
@@ -1241,7 +1356,7 @@
"include": "#razor-codeblock-body"
}
],
"end": "(?<=})"
"end": "(?<=})|(?<=;)|(?=^\\s*\\})"
},
"if-statement-with-optional-transition": {
"name": "meta.statement.if.razor",
@@ -1269,7 +1384,7 @@
"include": "#razor-codeblock-body"
}
],
"end": "(?<=})"
"end": "(?<=})|(?<=;)|(?=^\\s*\\})"
},
"else-part": {
"name": "meta.statement.else.razor",
@@ -1293,7 +1408,7 @@
"include": "#razor-codeblock-body"
}
],
"end": "(?<=})"
"end": "(?<=})|(?<=;)|(?=^\\s*\\})"
},
"for-statement": {
"name": "meta.statement.for.razor",
@@ -1321,7 +1436,7 @@
"include": "#razor-codeblock-body"
}
],
"end": "(?<=})"
"end": "(?<=})|(?<=;)|(?=^\\s*\\})"
},
"for-statement-with-optional-transition": {
"name": "meta.statement.for.razor",
@@ -1349,7 +1464,7 @@
"include": "#razor-codeblock-body"
}
],
"end": "(?<=})"
"end": "(?<=})|(?<=;)|(?=^\\s*\\})"
},
"foreach-statement": {
"name": "meta.statement.foreach.razor",
@@ -1384,7 +1499,7 @@
"include": "#razor-codeblock-body"
}
],
"end": "(?<=})"
"end": "(?<=})|(?<=;)|(?=^\\s*\\})"
},
"foreach-statement-with-optional-transition": {
"name": "meta.statement.foreach.razor",
@@ -1419,7 +1534,7 @@
"include": "#razor-codeblock-body"
}
],
"end": "(?<=})"
"end": "(?<=})|(?<=;)|(?=^\\s*\\})"
},
"foreach-condition": {
"begin": "\\(",
@@ -1505,7 +1620,7 @@
"include": "#razor-codeblock-body"
}
],
"end": "(?<=})"
"end": "(?<=})|(?<=;)|(?=^\\s*\\})"
},
"do-statement-with-optional-transition": {
"name": "meta.statement.do.razor",
@@ -1533,7 +1648,7 @@
"include": "#razor-codeblock-body"
}
],
"end": "(?<=})"
"end": "(?<=})|(?<=;)|(?=^\\s*\\})"
},
"while-statement": {
"name": "meta.statement.while.razor",
@@ -1594,7 +1709,7 @@
"include": "#razor-codeblock-body"
}
],
"end": "(?<=})"
"end": "(?<=})|(?<=;)|(?=^\\s*\\})"
},
"switch-statement-with-optional-transition": {
"name": "meta.statement.switch.razor",
@@ -1622,7 +1737,7 @@
"include": "#razor-codeblock-body"
}
],
"end": "(?<=})"
"end": "(?<=})|(?<=;)|(?=^\\s*\\})"
},
"switch-code-block": {
"name": "meta.structure.razor.csharp.codeblock.switch",
@@ -1676,7 +1791,7 @@
"include": "#razor-codeblock-body"
}
],
"end": "(?<=})"
"end": "(?<=})|(?<=;)|(?=^\\s*\\})"
},
"lock-statement-with-optional-transition": {
"name": "meta.statement.lock.razor",
@@ -1704,7 +1819,7 @@
"include": "#razor-codeblock-body"
}
],
"end": "(?<=})"
"end": "(?<=})|(?<=;)|(?=^\\s*\\})"
},
"try-statement": {
"patterns": [
@@ -1758,7 +1873,7 @@
"include": "#razor-codeblock-body"
}
],
"end": "(?<=})"
"end": "(?<=})|(?<=;)|(?=^\\s*\\})"
},
"try-block-with-optional-transition": {
"name": "meta.statement.try.razor",
@@ -1786,7 +1901,7 @@
"include": "#razor-codeblock-body"
}
],
"end": "(?<=})"
"end": "(?<=})|(?<=;)|(?=^\\s*\\})"
},
"catch-clause": {
"name": "meta.statement.catch.razor",
@@ -1810,7 +1925,7 @@
"include": "#razor-codeblock-body"
}
],
"end": "(?<=})"
"end": "(?<=})|(?<=;)|(?=^\\s*\\})"
},
"catch-condition": {
"begin": "\\(",
@@ -1859,7 +1974,7 @@
"include": "#razor-codeblock-body"
}
],
"end": "(?<=})"
"end": "(?<=})|(?<=;)|(?=^\\s*\\})"
},
"await-prefix": {
"name": "keyword.other.await.cs",