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

7 lines
12 KiB
JavaScript
Raw Normal View History

2024-10-14 06:09:33 +00:00
const lang = Object.freeze({ "displayName": "Cadence", "name": "cadence", "patterns": [{ "include": "#comments" }, { "include": "#expressions" }, { "include": "#declarations" }, { "include": "#keywords" }, { "include": "#code-block" }, { "include": "#composite" }, { "include": "#event" }], "repository": { "code-block": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.section.scope.begin.cadence" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.scope.end.cadence" } }, "patterns": [{ "include": "$self" }] }, "comments": { "patterns": [{ "captures": { "1": { "name": "punctuation.definition.comment.cadence" } }, "match": "\\A^(#!).*$\\n?", "name": "comment.line.number-sign.cadence" }, { "begin": "/\\*\\*(?!/)", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.cadence" } }, "end": "\\*/", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.cadence" } }, "name": "comment.block.documentation.cadence", "patterns": [{ "include": "#nested" }] }, { "begin": "/\\*:", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.cadence" } }, "end": "\\*/", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.cadence" } }, "name": "comment.block.documentation.playground.cadence", "patterns": [{ "include": "#nested" }] }, { "begin": "/\\*", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.cadence" } }, "end": "\\*/", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.cadence" } }, "name": "comment.block.cadence", "patterns": [{ "include": "#nested" }] }, { "match": "\\*/", "name": "invalid.illegal.unexpected-end-of-block-comment.cadence" }, { "begin": "(^[ \\t]+)?(?=//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.cadence" } }, "end": "(?!\\G)", "patterns": [{ "begin": "///", "beginCaptures": { "0": { "name": "punctuation.definition.comment.cadence" } }, "end": "^", "name": "comment.line.triple-slash.documentation.cadence" }, { "begin": "//:", "beginCaptures": { "0": { "name": "punctuation.definition.comment.cadence" } }, "end": "^", "name": "comment.line.double-slash.documentation.cadence" }, { "begin": "//", "beginCaptures": { "0": { "name": "punctuation.definition.comment.cadence" } }, "end": "^", "name": "comment.line.double-slash.cadence" }] }], "repository": { "nested": { "begin": "/\\*", "end": "\\*/", "patterns": [{ "include": "#nested" }] } } }, "composite": { "begin": "\\b((?:(?:struct|resource|contract)(?:\\s+interface)?)|transaction|enum)\\s+([\\p{L}_][\\p{L}_\\p{N}\\p{M}]*)", "beginCaptures": { "1": { "name": "storage.type.$1.cadence" }, "2": { "name": "entity.name.type.$1.cadence" } }, "end": "(?<=\\})", "name": "meta.definition.type.composite.cadence", "patterns": [{ "include": "#comments" }, { "include": "#conformance-clause" }, { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.type.begin.cadence" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.type.end.cadence" } }, "name": "meta.definition.type.body.cadence", "patterns": [{ "include": "$self" }] }] }, "conformance-clause": { "begin": "(:)(?=\\s*\\{)|(:)\\s*", "beginCaptures": { "1": { "name": "invalid.illegal.empty-conformance-clause.cadence" }, "2": { "name": "punctuation.separator.conformance-clause.cadence" } }, "end": "(?!\\G)$|(?=[={}])", "name": "meta.conformance-clause.cadence", "patterns": [{ "begin": "\\G", "end": "(?!\\G)$|(?=[={}])", "patterns": [{ "include": "#comments" }, { "include": "#type" }] }] }, "declarations": { "patterns": [{ "include": "#var-let-declaration" }, { "include": "#function" }, { "include": "#initializer" }] }, "event": { "begin": "\\b(event)\\b\\s+([\\p{L}_][\\p{L}_\\p{N}\\p{M}]*)\\s*", "beginCaptures": { "1": { "name": "storage.type.event.cadence" }, "2": { "name": "entity.name.type.event.cadence" } }, "end": "(?<=\\))|$", "name": "meta.definition.type.event.cadence", "patterns": [{ "include": "#comments" }, { "include": "#parameter-clause" }] }, "expression-element-list": { "patterns": [{ "include": "#commen
var cadence = [
lang
];
export { cadence as default };