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

7 lines
17 KiB
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
const lang = Object.freeze({ "displayName": "Solidity", "fileTypes": ["sol"], "name": "solidity", "patterns": [{ "include": "#natspec" }, { "include": "#declaration-userType" }, { "include": "#comment" }, { "include": "#operator" }, { "include": "#global" }, { "include": "#control" }, { "include": "#constant" }, { "include": "#primitive" }, { "include": "#type-primitive" }, { "include": "#type-modifier-extended-scope" }, { "include": "#declaration" }, { "include": "#function-call" }, { "include": "#assembly" }, { "include": "#punctuation" }], "repository": { "assembly": { "patterns": [{ "match": "\\b(assembly)\\b", "name": "keyword.control.assembly" }, { "match": "\\b(let)\\b", "name": "storage.type.assembly" }] }, "comment": { "patterns": [{ "include": "#comment-line" }, { "include": "#comment-block" }] }, "comment-block": { "begin": "/\\*", "end": "\\*/", "name": "comment.block", "patterns": [{ "include": "#comment-todo" }] }, "comment-line": { "begin": "(?<!tp:)//", "end": "$", "name": "comment.line", "patterns": [{ "include": "#comment-todo" }] }, "comment-todo": { "match": "(?i)\\b(FIXME|TODO|CHANGED|XXX|IDEA|HACK|NOTE|REVIEW|NB|BUG|QUESTION|COMBAK|TEMP|SUPPRESS|LINT|\\w+-disable|\\w+-suppress)\\b(?-i)", "name": "keyword.comment.todo" }, "constant": { "patterns": [{ "include": "#constant-boolean" }, { "include": "#constant-time" }, { "include": "#constant-currency" }] }, "constant-boolean": { "match": "\\b(true|false)\\b", "name": "constant.language.boolean" }, "constant-currency": { "match": "\\b(ether|wei|gwei|finney|szabo)\\b", "name": "constant.language.currency" }, "constant-time": { "match": "\\b(seconds|minutes|hours|days|weeks|years)\\b", "name": "constant.language.time" }, "control": { "patterns": [{ "include": "#control-flow" }, { "include": "#control-using" }, { "include": "#control-import" }, { "include": "#control-pragma" }, { "include": "#control-underscore" }, { "include": "#control-unchecked" }, { "include": "#control-other" }] }, "control-flow": { "patterns": [{ "match": "\\b(if|else|for|while|do|break|continue|try|catch|finally|throw|return|global)\\b", "name": "keyword.control.flow" }, { "begin": "\\b(returns)\\b", "beginCaptures": { "1": { "name": "keyword.control.flow.return" } }, "end": "(?=\\))", "patterns": [{ "include": "#declaration-function-parameters" }] }] }, "control-import": { "patterns": [{ "begin": "\\b(import)\\b", "beginCaptures": { "1": { "name": "keyword.control.import" } }, "end": "(?=\\;)", "patterns": [{ "begin": "((?=\\{))", "end": "((?=\\}))", "patterns": [{ "match": "\\b(\\w+)\\b", "name": "entity.name.type.interface" }] }, { "match": "\\b(from)\\b", "name": "keyword.control.import.from" }, { "include": "#string" }, { "include": "#punctuation" }] }, { "match": "\\b(import)\\b", "name": "keyword.control.import" }] }, "control-other": { "match": "\\b(new|delete|emit)\\b", "name": "keyword.control" }, "control-pragma": { "captures": { "1": { "name": "keyword.control.pragma" }, "2": { "name": "entity.name.tag.pragma" }, "3": { "name": "constant.other.pragma" } }, "match": "\\b(pragma)(?:\\s+([A-Za-z_]\\w+)\\s+([^\\s]+))?\\b" }, "control-unchecked": { "match": "\\b(unchecked)\\b", "name": "keyword.control.unchecked" }, "control-underscore": { "match": "\\b(_)\\b", "name": "constant.other.underscore" }, "control-using": { "patterns": [{ "captures": { "1": { "name": "keyword.control.using" }, "2": { "name": "entity.name.type.library" }, "3": { "name": "keyword.control.for" }, "4": { "name": "entity.name.type" } }, "match": "\\b(using)\\b\\s+\\b([A-Za-z\\d_]+)\\b\\s+\\b(for)\\b\\s+\\b([A-Za-z\\d_]+)" }, { "match": "\\b(using)\\b", "name": "keyword.control.using" }] }, "declaration": { "patterns": [{ "include": "#declaration-contract" }, { "include": "#declaration-userType" }, { "include": "#declaration-interface" }, { "include": "#declaration-library" }, { "include": "#declaration-function" }, { "include": "#declaration-modifier" }, { "include": "#declaration-constructor" }, { "include": "#declaration-event" }, { "include": "#declaration-storage" }, { "include": "#declaration-erro
var solidity = [
lang
];
export { solidity as default };