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

7 lines
37 KiB
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
const lang = Object.freeze({ "displayName": "Haxe", "fileTypes": ["hx", "dump"], "name": "haxe", "patterns": [{ "include": "#all" }], "repository": { "abstract": { "begin": "(?=abstract\\s+[A-Z])", "end": "(?<=\\})|(;)", "endCaptures": { "1": { "name": "punctuation.terminator.hx" } }, "name": "meta.abstract.hx", "patterns": [{ "include": "#abstract-name" }, { "include": "#abstract-name-post" }, { "include": "#abstract-block" }] }, "abstract-block": { "begin": "(?<=\\{)", "end": "(\\})", "endCaptures": { "1": { "name": "punctuation.definition.block.end.hx" } }, "name": "meta.block.hx", "patterns": [{ "include": "#method" }, { "include": "#modifiers" }, { "include": "#variable" }, { "include": "#block" }, { "include": "#block-contents" }] }, "abstract-name": { "begin": "\\b(abstract)\\b", "beginCaptures": { "1": { "name": "storage.type.class.hx" } }, "end": "([_A-Za-z]\\w*)", "endCaptures": { "1": { "name": "entity.name.type.class.hx" } }, "patterns": [{ "include": "#global" }] }, "abstract-name-post": { "begin": "(?<=\\w)", "end": "([\\{;])", "endCaptures": { "1": { "name": "punctuation.definition.block.begin.hx" } }, "patterns": [{ "include": "#global" }, { "match": "\\b(from|to)\\b", "name": "keyword.other.hx" }, { "include": "#type" }, { "match": "[\\(\\)]", "name": "punctuation.definition.other.hx" }] }, "accessor-method": { "patterns": [{ "match": "\\b(get|set)_[_A-Za-z]\\w*\\b", "name": "entity.name.function.hx" }] }, "all": { "patterns": [{ "include": "#global" }, { "include": "#package" }, { "include": "#import" }, { "include": "#using" }, { "match": "\\b(final)\\b(?=\\s+(class|interface|extern|private)\\b)", "name": "storage.modifier.hx" }, { "include": "#abstract" }, { "include": "#class" }, { "include": "#enum" }, { "include": "#interface" }, { "include": "#typedef" }, { "include": "#block" }, { "include": "#block-contents" }] }, "array": { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.definition.array.begin.hx" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.array.end.hx" } }, "name": "meta.array.literal.hx", "patterns": [{ "include": "#block" }, { "include": "#block-contents" }] }, "arrow-function": { "begin": "(\\()(?=[^(]*?\\)\\s*->)", "beginCaptures": { "1": { "name": "punctuation.definition.parameters.begin.hx" } }, "end": "(\\))\\s*(->)", "endCaptures": { "1": { "name": "punctuation.definition.parameters.end.hx" }, "2": { "name": "storage.type.function.arrow.hx" } }, "name": "meta.method.arrow.hx", "patterns": [{ "include": "#arrow-function-parameter" }] }, "arrow-function-parameter": { "begin": "(?<=\\(|,)", "end": "(?=\\)|,)", "patterns": [{ "include": "#parameter-name" }, { "include": "#arrow-function-parameter-type-hint" }, { "include": "#parameter-assign" }, { "include": "#punctuation-comma" }, { "include": "#global" }] }, "arrow-function-parameter-type-hint": { "begin": ":", "beginCaptures": { "0": { "name": "keyword.operator.type.annotation.hx" } }, "end": "(?=\\)|,|=)", "patterns": [{ "include": "#type" }] }, "block": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.block.begin.hx" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.block.end.hx" } }, "patterns": [{ "include": "#block" }, { "include": "#block-contents" }] }, "block-contents": { "patterns": [{ "include": "#global" }, { "include": "#regex" }, { "include": "#array" }, { "include": "#constants" }, { "include": "#strings" }, { "include": "#metadata" }, { "include": "#method" }, { "include": "#variable" }, { "include": "#modifiers" }, { "include": "#new-expr" }, { "include": "#for-loop" }, { "include": "#keywords" }, { "include": "#arrow-function" }, { "include": "#method-call" }, { "include": "#enum-constructor-call" }, { "include": "#punctuation-braces" }, { "include": "#macro-reification" }, { "include": "#operators" }, { "include": "#operator-assignment" }, { "include": "#punctuation-terminator" }, { "include": "#punctuation-comma" }, { "include": "#punctuation-accessor" }, { "include": "#identifiers" }] }, "class": { "begin": "(?=class)"
var haxe = [
lang
];
export { haxe as default };