Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

137 lines (136 sloc) 4.963 kb
{
"name": "Razor",
"scopeName": "text.html.cshtml",
"fileTypes": ["cshtml"],
"patterns": [
{
"name": "section.embedded.source.cshtml",
"begin": "(@?([a-zA-Z0-9]+)?)(\\s[a-zA-Z0-9]+)?(\n|\r)?(\\{)",
"beginCaptures": {
"0": { "name": "section.embedded.begin.cshtml"},
"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": "section.embedded.begin.cshtml"},
"0": { "name": "punctuation.section.embedded.begin.cshtml" },
"1": { "name": "keyword.control.cshtml"}
},
"patterns": [
{
"include": "#embedded-code"
},
{
"include": "#comments"
},
{ "include": "#single-quotes" },
{ "include": "#line-comments" },
{ "include": "#block-comments" },
{ "include": "#double-quotes" },
{
"include": "source.cs"
},
{
"include": "text.html.basic"
}
],
"end": "\\}",
"endCaptures": {
"0": { "name": "punctuation.section.embedded.begin.cshtml" }
}
},
{
"include": "#embedded-code"
},
{
"include": "#comments"
},
{ "include": "#line-comments" },
{ "include": "#block-comments" },
{ "include": "#single-quotes" },
{ "include": "#double-quotes" },
{
"include": "text.html.basic"
}
],
"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": "#comments" },
{ "include": "#single-quotes" },
{ "include": "#double-quotes" },
{ "include": "source.cs" },
{ "include": "text.html.basic" },
{ "include": "text.html.handlebars" }
],
"end": "(\\n|\\s)",
"comments": "Covers single line Razor tags"
},
{ "include": "#comments" },
{ "include": "text.html.basic" },
{ "include": "text.html.handlebars" }
],
"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": "#comments"
}
]
},
"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": "\""
}
},
"uuid": "4f902f1e-9ac6-497d-a110-6d450bfd5b0b"
}
Jump to Line
Something went wrong with that request. Please try again.