site/node_modules/shiki/dist/langs/apex.mjs

7 lines
49 KiB
JavaScript
Raw Normal View History

2024-10-14 06:09:33 +00:00
const lang = Object.freeze({ "displayName": "Apex", "fileTypes": ["apex", "cls", "trigger"], "name": "apex", "patterns": [{ "include": "#javadoc-comment" }, { "include": "#comment" }, { "include": "#directives" }, { "include": "#declarations" }, { "include": "#script-top-level" }], "repository": { "annotation-declaration": { "begin": "([@][_[:alpha:]]+)\\b", "beginCaptures": { "1": { "name": "storage.type.annotation.apex" } }, "end": "(?<=\\)|$)", "patterns": [{ "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.apex" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.apex" } }, "patterns": [{ "include": "#expression" }] }, { "include": "#statement" }] }, "argument-list": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.apex" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.apex" } }, "patterns": [{ "include": "#named-argument" }, { "include": "#expression" }, { "include": "#punctuation-comma" }] }, "array-creation-expression": { "begin": "(?x)\n\\b(new)\\b\\s*\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)\n(?:\\s*\\?\\s*)?\n(?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)*\n)\n)?\\s*\n(?=\\[)", "beginCaptures": { "1": { "name": "keyword.control.new.apex" }, "2": { "patterns": [{ "include": "#support-type" }, { "include": "#type" }] } }, "end": "(?<=\\])", "patterns": [{ "include": "#bracketed-argument-list" }] }, "block": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.apex" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.apex" } }, "patterns": [{ "include": "#statement" }] }, "boolean-literal": { "patterns": [{ "match": "(?<!\\.)\\btrue\\b", "name": "constant.language.boolean.true.apex" }, { "match": "(?<!\\.)\\bfalse\\b", "name": "constant.language.boolean.false.apex" }] }, "bracketed-argument-list": { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.squarebracket.open.apex" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.squarebracket.close.apex" } }, "patterns": [{ "include": "#soql-query-expression" }, { "include": "#named-argument" }, { "include": "#expression" }, { "include": "#punctuation-comma" }] }, "break-or-continue-statement": { "captures": { "1": { "name": "keyword.control.flow.break.apex" }, "2": { "name": "keyword.control.flow.continue.apex" } }, "match": "(?<!\\.)\\b(?:(break)|(continue))\\b" }, "cast-expression": { "captures": { "1": { "name": "punctuation.parenthesis.open.apex" }, "2": { "patterns": [{ "include": "#support-type" }, { "include": "#type" }] }, "6": { "name": "punctuation.parenthesis.close.apex" } }, "match": "(?x)\n(\\()\\s*\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)\n(?:\\s*\\?\\s*)?\n(?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)*\n)\n)\\s*\n(\\))(?=\\s*@?[_[:alnum:]\\(])" }, "catch-clause": { "begin": "(?<!\\.)\\b(catch)\\b", "beginCaptures": { "1": { "name": "keyword.control.try.catch.apex" } }, "end": "(?<=\\})", "patterns": [{ "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.apex" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.apex" } }, "patterns": [{ "captures": { "1": { "patterns": [{ "include": "#support-type" }, { "include": "#type" }] }, "5": { "name": "entity.name.variable.local.apex" } }, "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)\n(?:\\s*\\?\\s*)?\n(?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)*\n)\n)\\s*\n(?:(\\g<identifier>)\\b)?" }] }, { "include": "#comment" }
var apex = [
lang
];
export { apex as default };