@inst/vscode-bin-darwin
Version:
BINARY ONLY - VSCode binary deployment for macOS
225 lines • 4.45 kB
JSON
{
"information_for_contributors": [
"This file has been converted from https://github.com/demyte/language-cshtml/blob/master/grammars/cshtml.json",
"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/demyte/language-cshtml/commit/cbf0e35971324e861247145e92f4cbbe0bc42d0e",
"name": "ASP.NET Razor",
"scopeName": "text.html.cshtml",
"fileTypes": [
"cshtml",
"gohtml"
],
"patterns": [
{
"name": "section.embedded.source.cshtml",
"begin": "(@?([a-zA-Z0-9]+)?)(\\s[a-zA-Z0-9]+)?(\n|\r)?(\\{)",
"beginCaptures": {
"0": {
"name": "punctuation.section.embedded.begin.cshtml"
},
"1": {
"name": "keyword.control.cshtml"
}
},
"patterns": [
{
"name": "section.embedded.source.cshtml",
"begin": "(@?([a-zA-Z0-9]+)?)(\\s[a-zA-Z0-9]+)?(\n|\r)?(\\{)",
"beginCaptures": {
"0": {
"name": "punctuation.section.embedded.begin.cshtml"
},
"1": {
"name": "keyword.control.cshtml"
}
},
"patterns": [
{
"include": "#embedded-code"
},
{
"include": "#general-includes"
},
{
"include": "source.cs"
}
],
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.section.embedded.begin.cshtml"
}
}
},
{
"include": "#embedded-code"
},
{
"include": "#general-includes"
},
{
"include": "source.cs"
}
],
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.section.embedded.begin.cshtml"
}
},
"comments": "Simple multi-line code section"
},
{
"begin": "(@[a-zA-Z0-9]+)(\\s?)",
"captures": {
"0": {
"name": "section.embedded.begin.cshtml"
},
"1": {
"name": "keyword.control.cshtml"
}
},
"patterns": [
{
"match": "(([a-zA-Z0-9]+)(\\.)?)+?",
"captures": {
"2": {
"name": "entity.name.tag.source.cshtml"
},
"3": {
"name": "punctuation.separator.namespace.source.cshtml"
}
}
},
{
"include": "#embedded-code"
},
{
"include": "#general-includes"
}
],
"end": "(\\n|\\s)",
"comments": "Single statement Razor tags"
},
{
"begin": "(@\\()",
"captures": {
"0": {
"name": "punctuation.section.embedded.begin.cshtml"
}
},
"patterns": [
{
"include": "#embedded-code"
},
{
"include": "#general-includes"
},
{
"include": "source.cs"
}
],
"end": "(\\))",
"comments": "Covers same line Razor statments with embedded C#"
},
{
"include": "#comments"
},
{
"include": "text.html.basic"
}
],
"repository": {
"embedded-code": {
"match": "(@?[a-zA-Z0-9]+)(\\.([a-zA-Z0-9]+))?",
"captures": {
"1": {
"name": "keyword.control.cshtml"
},
"3": {
"name": "entity.name.tag.source.cshtml"
}
},
"patterns": [
{
"include": "#general-includes"
}
]
},
"comments": {
"begin": "@\\*",
"captures": {
"0": {
"name": "punctuation.definition.comment.source.cshtml"
}
},
"end": "\\*@",
"name": "comment.block.cshtml"
},
"line-comments": {
"name": "comment.line.double-slash.cshtml",
"begin": "(\\s*)//",
"end": "$(\\s*)"
},
"block-comments": {
"name": "comment.block.cshtml",
"begin": "/\\*",
"end": "((?=})|(\\*/))"
},
"single-quotes": {
"name": "string.quoted.single.cshtml",
"begin": "'",
"end": "'"
},
"double-quotes": {
"name": "string.quoted.double.cshtml",
"begin": "\"",
"end": "\"",
"patterns": [
{
"include": "text.html.basic"
}
]
},
"round-brackets": {
"name": "string.bracers.round.cshtml",
"begin": "\\(",
"end": "\\)"
},
"squiggly-brackets": {
"name": "string.bracers.squiggly.cshtml",
"begin": "{",
"end": "}"
},
"general-includes": {
"patterns": [
{
"include": "#comments"
},
{
"include": "#line-comments"
},
{
"include": "#block-comments"
},
{
"include": "#round-brackets"
},
{
"include": "#squiggly-brackets"
},
{
"include": "#single-quotes"
},
{
"include": "#double-quotes"
},
{
"include": "text.html.basic"
}
]
}
}
}