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

7 lines
62 KiB
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
const lang = Object.freeze({ "displayName": "Ballerina", "fileTypes": ["bal"], "name": "ballerina", "patterns": [{ "include": "#statements" }], "repository": { "access-modifier": { "patterns": [{ "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "name": "storage.modifier.ballerina keyword.other.ballerina" }] }, "annotationAttachment": { "patterns": [{ "captures": { "1": { "name": "punctuation.decorator.ballerina" }, "2": { "name": "support.type.ballerina" }, "3": { "name": "punctuation.decorator.ballerina" }, "4": { "name": "support.type.ballerina" } }, "match": "(@)((?:[_$[:alpha:]][_$[:alnum:]]*))\\s*(:?)\\s*((?:[_$[:alpha:]][_$[:alnum:]]*)?)" }] }, "annotationDefinition": { "patterns": [{ "begin": "\\bannotation\\b", "beginCaptures": { "0": { "name": "keyword.ballerina" } }, "end": ";", "patterns": [{ "include": "#code" }] }] }, "array-literal": { "begin": "\\s*(\\[)", "beginCaptures": { "1": { "name": "meta.brace.square.ballerina" } }, "end": "\\]", "endCaptures": { "0": { "name": "meta.brace.square.ballerina" } }, "name": "meta.array.literal.ballerina", "patterns": [{ "include": "#expression" }, { "include": "#punctuation-comma" }] }, "booleans": { "patterns": [{ "match": "\\b(true|false)\\b", "name": "constant.language.boolean.ballerina" }] }, "butClause": { "patterns": [{ "begin": "=>", "beginCaptures": { "0": { "name": "meta.arrow.ballerina storage.type.function.arrow.ballerina" } }, "end": ",|(?=\\})", "patterns": [{ "include": "#code" }] }] }, "butExp": { "patterns": [{ "begin": "\\bbut\\b", "beginCaptures": { "0": { "name": "keyword.ballerina" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.block.ballerina.documentation" } }, "patterns": [{ "include": "#butExpBody" }, { "include": "#comment" }] }] }, "butExpBody": { "patterns": [{ "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.block.ballerina.documentation" } }, "end": "(?=\\})", "endCaptures": { "0": { "name": "punctuation.definition.block.ballerina.documentation" } }, "patterns": [{ "include": "#parameter" }, { "include": "#butClause" }, { "include": "#comment" }] }] }, "call": { "patterns": [{ "match": "(?:\\')?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=\\()", "name": "entity.name.function.ballerina" }] }, "callableUnitBody": { "patterns": [{ "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.block.ballerina" } }, "end": "(?=\\})", "endCaptures": { "0": { "name": "punctuation.definition.block.ballerina" } }, "patterns": [{ "include": "#workerDef" }, { "include": "#service-decl" }, { "include": "#objectDec" }, { "include": "#function-defn" }, { "include": "#forkStatement" }, { "include": "#code" }] }] }, "class-body": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.block.ballerina" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.block.ballerina" } }, "name": "meta.class.body.ballerina", "patterns": [{ "include": "#comment" }, { "include": "#mdDocumentation" }, { "include": "#function-defn" }, { "include": "#var-expr" }, { "include": "#variable-initializer" }, { "include": "#access-modifier" }, { "include": "#keywords" }, { "begin": "(?<=:)\\s*", "end": "(?=\\s|[;),}\\]:\\-\\+]|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|service|type|var)\\b))" }, { "include": "#decl-block" }, { "include": "#expression" }, { "include": "#punctuation-comma" }, { "include": "#punctuation-semicolon" }] }, "class-defn": { "begin": "(\\s+)(class\\b)|^class\\b(?=\\s+|/[/*])", "beginCaptures": { "0": { "name": "storage.type.class.ballerina keyword.other.ballerina" } }, "end": "(?<=\\})", "name": "meta.class.ballerina", "patterns": [{ "include": "#keywords" }, { "captures": { "0": { "name": "entity.name.type.class.ballerina" } }, "match": "[_$[:alpha:]][_$[:alnum:]]*" }, { "include": "#class-body" }] }, "code": { "patterns": [{ "include": "#booleans" }, { "include": "#matchStatement" }, { "include": "#butExp" }, { "incl
var ballerina = [
lang
];
export { ballerina as default };