mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
Update grammars (#167938)
This commit is contained in:
@@ -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-tooling/commit/4d5eeeaeeadf6371354e5fd8ad4c195185806f0c",
|
||||
"version": "https://github.com/dotnet/razor-tooling/commit/8d0ae9664cb27276eab36d83e48e88356468ca67",
|
||||
"name": "ASP.NET Razor",
|
||||
"scopeName": "text.html.cshtml",
|
||||
"patterns": [
|
||||
@@ -41,6 +41,31 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"optionally-transitioned-razor-control-structures": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#razor-comment"
|
||||
},
|
||||
{
|
||||
"include": "#razor-codeblock"
|
||||
},
|
||||
{
|
||||
"include": "#explicit-razor-expression"
|
||||
},
|
||||
{
|
||||
"include": "#escaped-transition"
|
||||
},
|
||||
{
|
||||
"include": "#directives"
|
||||
},
|
||||
{
|
||||
"include": "#optionally-transitioned-csharp-control-structures"
|
||||
},
|
||||
{
|
||||
"include": "#implicit-expression"
|
||||
}
|
||||
]
|
||||
},
|
||||
"escaped-transition": {
|
||||
"name": "constant.character.escape.razor.transition",
|
||||
"match": "@@"
|
||||
@@ -89,7 +114,7 @@
|
||||
"include": "#razor-single-line-markup"
|
||||
},
|
||||
{
|
||||
"include": "#razor-control-structures"
|
||||
"include": "#optionally-transitioned-razor-control-structures"
|
||||
},
|
||||
{
|
||||
"include": "source.cs"
|
||||
@@ -966,6 +991,40 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"optionally-transitioned-csharp-control-structures": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#using-statement-with-optional-transition"
|
||||
},
|
||||
{
|
||||
"include": "#if-statement-with-optional-transition"
|
||||
},
|
||||
{
|
||||
"include": "#else-part"
|
||||
},
|
||||
{
|
||||
"include": "#foreach-statement-with-optional-transition"
|
||||
},
|
||||
{
|
||||
"include": "#for-statement-with-optional-transition"
|
||||
},
|
||||
{
|
||||
"include": "#while-statement"
|
||||
},
|
||||
{
|
||||
"include": "#switch-statement-with-optional-transition"
|
||||
},
|
||||
{
|
||||
"include": "#lock-statement-with-optional-transition"
|
||||
},
|
||||
{
|
||||
"include": "#do-statement-with-optional-transition"
|
||||
},
|
||||
{
|
||||
"include": "#try-statement-with-optional-transition"
|
||||
}
|
||||
]
|
||||
},
|
||||
"transitioned-csharp-control-structures": {
|
||||
"patterns": [
|
||||
{
|
||||
@@ -1001,6 +1060,34 @@
|
||||
]
|
||||
},
|
||||
"using-statement": {
|
||||
"name": "meta.statement.using.razor",
|
||||
"begin": "(?:(@))(using)\\b\\s*(?=\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#transition"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.other.using.cs"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#csharp-condition"
|
||||
},
|
||||
{
|
||||
"include": "#csharp-code-block"
|
||||
},
|
||||
{
|
||||
"include": "#razor-codeblock-body"
|
||||
}
|
||||
],
|
||||
"end": "(?<=})"
|
||||
},
|
||||
"using-statement-with-optional-transition": {
|
||||
"name": "meta.statement.using.razor",
|
||||
"begin": "(?:^\\s*|(@))(using)\\b\\s*(?=\\()",
|
||||
"beginCaptures": {
|
||||
@@ -1029,6 +1116,34 @@
|
||||
"end": "(?<=})"
|
||||
},
|
||||
"if-statement": {
|
||||
"name": "meta.statement.if.razor",
|
||||
"begin": "(?:(@))(if)\\b\\s*(?=\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#transition"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.control.conditional.if.cs"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#csharp-condition"
|
||||
},
|
||||
{
|
||||
"include": "#csharp-code-block"
|
||||
},
|
||||
{
|
||||
"include": "#razor-codeblock-body"
|
||||
}
|
||||
],
|
||||
"end": "(?<=})"
|
||||
},
|
||||
"if-statement-with-optional-transition": {
|
||||
"name": "meta.statement.if.razor",
|
||||
"begin": "(?:^\\s*|(@))(if)\\b\\s*(?=\\()",
|
||||
"beginCaptures": {
|
||||
@@ -1081,6 +1196,34 @@
|
||||
"end": "(?<=})"
|
||||
},
|
||||
"for-statement": {
|
||||
"name": "meta.statement.for.razor",
|
||||
"begin": "(?:(@))(for)\\b\\s*(?=\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#transition"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.control.loop.for.cs"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#csharp-condition"
|
||||
},
|
||||
{
|
||||
"include": "#csharp-code-block"
|
||||
},
|
||||
{
|
||||
"include": "#razor-codeblock-body"
|
||||
}
|
||||
],
|
||||
"end": "(?<=})"
|
||||
},
|
||||
"for-statement-with-optional-transition": {
|
||||
"name": "meta.statement.for.razor",
|
||||
"begin": "(?:^\\s*|(@))(for)\\b\\s*(?=\\()",
|
||||
"beginCaptures": {
|
||||
@@ -1109,6 +1252,41 @@
|
||||
"end": "(?<=})"
|
||||
},
|
||||
"foreach-statement": {
|
||||
"name": "meta.statement.foreach.razor",
|
||||
"begin": "(?:(@)(await\\s+)?)(foreach)\\b\\s*(?=\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#transition"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#await-prefix"
|
||||
}
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"name": "keyword.control.loop.foreach.cs"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#foreach-condition"
|
||||
},
|
||||
{
|
||||
"include": "#csharp-code-block"
|
||||
},
|
||||
{
|
||||
"include": "#razor-codeblock-body"
|
||||
}
|
||||
],
|
||||
"end": "(?<=})"
|
||||
},
|
||||
"foreach-statement-with-optional-transition": {
|
||||
"name": "meta.statement.foreach.razor",
|
||||
"begin": "(?:^\\s*|(@)(await\\s+)?)(foreach)\\b\\s*(?=\\()",
|
||||
"beginCaptures": {
|
||||
@@ -1203,7 +1381,35 @@
|
||||
},
|
||||
"do-statement": {
|
||||
"name": "meta.statement.do.razor",
|
||||
"begin": "(?:^\\s*|(@))(do)\\b\\s*",
|
||||
"begin": "(?:(@))(do)\\b\\s",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#transition"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.control.loop.do.cs"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#csharp-condition"
|
||||
},
|
||||
{
|
||||
"include": "#csharp-code-block"
|
||||
},
|
||||
{
|
||||
"include": "#razor-codeblock-body"
|
||||
}
|
||||
],
|
||||
"end": "(?<=})"
|
||||
},
|
||||
"do-statement-with-optional-transition": {
|
||||
"name": "meta.statement.do.razor",
|
||||
"begin": "(?:^\\s*|(@))(do)\\b\\s",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
@@ -1263,6 +1469,34 @@
|
||||
}
|
||||
},
|
||||
"switch-statement": {
|
||||
"name": "meta.statement.switch.razor",
|
||||
"begin": "(?:(@))(switch)\\b\\s*(?=\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#transition"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.control.switch.cs"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#csharp-condition"
|
||||
},
|
||||
{
|
||||
"include": "#switch-code-block"
|
||||
},
|
||||
{
|
||||
"include": "#razor-codeblock-body"
|
||||
}
|
||||
],
|
||||
"end": "(?<=})"
|
||||
},
|
||||
"switch-statement-with-optional-transition": {
|
||||
"name": "meta.statement.switch.razor",
|
||||
"begin": "(?:^\\s*|(@))(switch)\\b\\s*(?=\\()",
|
||||
"beginCaptures": {
|
||||
@@ -1314,6 +1548,34 @@
|
||||
}
|
||||
},
|
||||
"lock-statement": {
|
||||
"name": "meta.statement.lock.razor",
|
||||
"begin": "(?:(@))(lock)\\b\\s*(?=\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#transition"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.other.lock.cs"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#csharp-condition"
|
||||
},
|
||||
{
|
||||
"include": "#csharp-code-block"
|
||||
},
|
||||
{
|
||||
"include": "#razor-codeblock-body"
|
||||
}
|
||||
],
|
||||
"end": "(?<=})"
|
||||
},
|
||||
"lock-statement-with-optional-transition": {
|
||||
"name": "meta.statement.lock.razor",
|
||||
"begin": "(?:^\\s*|(@))(lock)\\b\\s*(?=\\()",
|
||||
"beginCaptures": {
|
||||
@@ -1354,7 +1616,48 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"try-statement-with-optional-transition": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#try-block-with-optional-transition"
|
||||
},
|
||||
{
|
||||
"include": "#catch-clause"
|
||||
},
|
||||
{
|
||||
"include": "#finally-clause"
|
||||
}
|
||||
]
|
||||
},
|
||||
"try-block": {
|
||||
"name": "meta.statement.try.razor",
|
||||
"begin": "(?:(@))(try)\\b\\s*",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#transition"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.control.try.cs"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#csharp-condition"
|
||||
},
|
||||
{
|
||||
"include": "#csharp-code-block"
|
||||
},
|
||||
{
|
||||
"include": "#razor-codeblock-body"
|
||||
}
|
||||
],
|
||||
"end": "(?<=})"
|
||||
},
|
||||
"try-block-with-optional-transition": {
|
||||
"name": "meta.statement.try.razor",
|
||||
"begin": "(?:^\\s*|(@))(try)\\b\\s*",
|
||||
"beginCaptures": {
|
||||
|
||||
Reference in New Issue
Block a user