14 lines
27 KiB
JavaScript
14 lines
27 KiB
JavaScript
|
import html from './html.mjs';
|
||
|
import csharp from './csharp.mjs';
|
||
|
import './javascript.mjs';
|
||
|
import './css.mjs';
|
||
|
|
||
|
const lang = Object.freeze({ "displayName": "ASP.NET Razor", "fileTypes": ["razor", "cshtml"], "injections": { "string.quoted.double.html": { "patterns": [{ "include": "#explicit-razor-expression" }, { "include": "#implicit-expression" }] }, "string.quoted.single.html": { "patterns": [{ "include": "#explicit-razor-expression" }, { "include": "#implicit-expression" }] } }, "name": "razor", "patterns": [{ "include": "#razor-control-structures" }, { "include": "text.html.basic" }], "repository": { "addTagHelper-directive": { "captures": { "1": { "patterns": [{ "include": "#transition" }] }, "2": { "name": "keyword.control.razor.directive.addTagHelper" }, "3": { "patterns": [{ "include": "#tagHelper-directive-argument" }] } }, "match": "(@)(addTagHelper)\\s+([^$]+)?", "name": "meta.directive" }, "attribute-directive": { "begin": "(@)(attribute)\\b\\s+", "beginCaptures": { "1": { "patterns": [{ "include": "#transition" }] }, "2": { "name": "keyword.control.razor.directive.attribute" } }, "end": "(?<=\\])|$", "name": "meta.directive", "patterns": [{ "include": "source.cs#attribute-section" }] }, "await-prefix": { "match": "(await)\\s+", "name": "keyword.other.await.cs" }, "balanced-brackets-csharp": { "begin": "(\\[)", "beginCaptures": { "1": { "name": "punctuation.squarebracket.open.cs" } }, "end": "(\\])", "endCaptures": { "1": { "name": "punctuation.squarebracket.close.cs" } }, "name": "razor.test.balanced.brackets", "patterns": [{ "include": "source.cs" }] }, "balanced-parenthesis-csharp": { "begin": "(\\()", "beginCaptures": { "1": { "name": "punctuation.parenthesis.open.cs" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.parenthesis.close.cs" } }, "name": "razor.test.balanced.parenthesis", "patterns": [{ "include": "source.cs" }] }, "catch-clause": { "begin": "(?:^|(?<=}))\\s*(catch)\\b\\s*?(?=[\\n\\(\\{])", "beginCaptures": { "1": { "name": "keyword.control.try.catch.cs" } }, "end": "(?<=})", "name": "meta.statement.catch.razor", "patterns": [{ "include": "#catch-condition" }, { "include": "source.cs#when-clause" }, { "include": "#csharp-code-block" }, { "include": "#razor-codeblock-body" }] }, "catch-condition": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.cs" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.cs" } }, "patterns": [{ "captures": { "1": { "patterns": [{ "include": "source.cs#type" }] }, "6": { "name": "entity.name.variable.local.cs" } }, "match": "(?x)\n(?<type-name>\n(?:\n(?:\n(?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)?\n(?<name-and-type-args>\n\\g<identifier>\\s*\n(?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n)\n(?:\\s*\\.\\s*\\g<name-and-type-args>)* |\n(?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n)\n(?:\\s*\\?\\s*)?\n(?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)*\n)\n)\\s*\n(?:(\\g<identifier>)\\b)?" }] }, "code-directive": { "begin": "(@)(code)((?=\\{)|\\s+)", "beginCaptures": { "1": { "patterns": [{ "include": "#transition" }] }, "2": { "name": "keyword.control.razor.directive.code" } }, "end": "(?<=})|\\s", "patterns": [{ "include": "#directive-codeblock" }] }, "csharp-code-block": { "begin": "(\\{)", "beginCaptures": { "1": { "name": "punctuation.curlybrace.open.cs" } }, "end": "(\\})", "endCaptures": { "1": { "name": "punctuation.curlybrace.close.cs" } }, "name": "meta.structure.razor.csharp.codeblock", "patterns": [{ "include": "#razor-codeblock-body" }] }, "csharp-condition": { "begin": "(\\()", "beginCaptures": { "1": { "name": "punctuation.parenthesis.open.cs" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.parenthesis.close.cs" } }, "patterns": [{ "include": "source.cs#local-variable-declaration" }, { "include": "source.cs#expression" }, { "include": "source.cs#punctuation-comma" }, { "include": "source.cs#punctuation-semicolon" }] }, "directive-codeblock": { "begin": "(\\{)", "beginCaptures": { "1": { "name": "keyword.control.razor.directive.codeblock.open" } }, "contentName": "source.cs", "end": "(\\})", "endCaptures": { "1": { "name": "keyword.control.razor.directive.cod
|
||
|
var razor = [
|
||
|
...html,
|
||
|
...csharp,
|
||
|
lang
|
||
|
];
|
||
|
|
||
|
export { razor as default };
|