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

7 lines
15 KiB
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
const lang = Object.freeze({ "displayName": "Clarity", "name": "clarity", "patterns": [{ "include": "#expression" }, { "include": "#define-constant" }, { "include": "#define-data-var" }, { "include": "#define-map" }, { "include": "#define-function" }, { "include": "#define-fungible-token" }, { "include": "#define-non-fungible-token" }, { "include": "#define-trait" }, { "include": "#use-trait" }], "repository": { "built-in-func": { "begin": "(?x) (\\() \\s* (\\-|\\+|<\\=|>\\=|<|>|\\*|/|and|append|as-contract|as-max-len\\?|asserts!|at-block|begin|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|buff-to-int-be|buff-to-int-le|buff-to-uint-be|buff-to-uint-le|concat|contract-call\\?|contract-of|default-to|element-at|element-at\\?|filter|fold|from-consensus-buff\\?|ft-burn\\?|ft-get-balance|ft-get-supply|ft-mint\\?|ft-transfer\\?|get-block-info\\?|get-burn-block-info\\?|hash160|if|impl-trait|index-of|index-of\\?|int-to-ascii|int-to-utf8|is-eq|is-err|is-none|is-ok|is-some|is-standard|keccak256|len|log2|map|match|merge|mod|nft-burn\\?|nft-get-owner\\?|nft-mint\\?|nft-transfer\\?|not|or|pow|principal-construct\\?|principal-destruct\\?|principal-of\\?|print|replace-at\\?|secp256k1-recover\\?|secp256k1-verify|sha256|sha512|sha512/256|slice\\?|sqrti|string-to-int\\?|string-to-uint\\?|stx-account|stx-burn\\?|stx-get-balance|stx-transfer-memo\\?|stx-transfer\\?|to-consensus-buff\\?|to-int|to-uint|try!|unwrap!|unwrap-err!|unwrap-err-panic|unwrap-panic|xor) \\s+", "beginCaptures": { "1": { "name": "punctuation.built-in-function.start.clarity" }, "2": { "name": "keyword.declaration.built-in-function.clarity" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.built-in-function.end.clarity" } }, "name": "meta.built-in-function", "patterns": [{ "include": "#expression" }, { "include": "#user-func" }] }, "comment": { "match": "(?x) (?<=^|[()\\[\\]{}\",'`;\\s]) (;) .* $", "name": "comment.line.semicolon.clarity" }, "data-type": { "patterns": [{ "include": "#comment" }, { "comment": "numerics", "match": "\\b(uint|int)\\b", "name": "entity.name.type.numeric.clarity" }, { "comment": "principal", "match": "\\b(principal)\\b", "name": "entity.name.type.principal.clarity" }, { "comment": "bool", "match": "\\b(bool)\\b", "name": "entity.name.type.bool.clarity" }, { "captures": { "1": { "name": "punctuation.string_type-def.start.clarity" }, "2": { "name": "entity.name.type.string_type.clarity" }, "3": { "name": "constant.numeric.string_type-len.clarity" }, "4": { "name": "punctuation.string_type-def.end.clarity" } }, "match": "(?x) (\\() \\s* (?:(string-ascii|string-utf8)\\s+(\\d+)) \\s* (\\))" }, { "captures": { "1": { "name": "punctuation.buff-def.start.clarity" }, "2": { "name": "entity.name.type.buff.clarity" }, "3": { "name": "constant.numeric.buf-len.clarity" }, "4": { "name": "punctuation.buff-def.end.clarity" } }, "match": "(?x) (\\() \\s* (buff)\\s+(\\d+)\\s* (\\))" }, { "begin": "(?x) (\\() \\s* (optional)\\s+", "beginCaptures": { "1": { "name": "punctuation.optional-def.start.clarity" }, "2": { "name": "storage.type.modifier" } }, "comment": "optional", "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.optional-def.end.clarity" } }, "name": "meta.optional-def", "patterns": [{ "include": "#data-type" }] }, { "begin": "(?x) (\\() \\s* (response)\\s+", "beginCaptures": { "1": { "name": "punctuation.response-def.start.clarity" }, "2": { "name": "storage.type.modifier" } }, "comment": "response", "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.response-def.end.clarity" } }, "name": "meta.response-def", "patterns": [{ "include": "#data-type" }] }, { "begin": "(?x) (\\() \\s* (list) \\s+ (\\d+) \\s+", "beginCaptures": { "1": { "name": "punctuation.list-def.start.clarity" }, "2": { "name": "entity.name.type.list.clarity" }, "3": { "name": "constant.numeric.list-len.clarity" } }, "comment": "list", "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.list-def.end.clarity" } }, "name": "meta.list-def", "patterns": [{ "include": "#data-type" }] }, { "begin": "(\\{)", "beginCaptures": { "1":
var clarity = [
lang
];
export { clarity as default };