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

16 lines
20 KiB
JavaScript
Raw Normal View History

2024-10-14 06:09:33 +00:00
import css from './css.mjs';
import less from './less.mjs';
import scss from './scss.mjs';
import javascript from './javascript.mjs';
const lang = Object.freeze({ "displayName": "Marko", "fileTypes": ["marko"], "name": "marko", "patterns": [{ "begin": "^\\s*(style)\\s+(\\{)", "beginCaptures": { "1": { "name": "storage.type.marko.css" }, "2": { "name": "punctuation.section.scope.begin.marko.css" } }, "comment": "CSS style block, eg: style { color: green }", "contentName": "source.css", "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.scope.end.marko.css" } }, "name": "meta.embedded.css", "patterns": [{ "include": "source.css" }] }, { "begin": "^\\s*(style)\\.(less)\\s+(\\{)", "beginCaptures": { "1": { "name": "storage.type.marko.css" }, "2": { "name": "storage.modifier.marko.css" }, "3": { "name": "punctuation.section.scope.begin.marko.css" } }, "comment": "Less style block, eg: style.less { color: green }", "contentName": "source.less", "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.scope.end.marko.css" } }, "name": "meta.embedded.less", "patterns": [{ "include": "source.css.less" }] }, { "begin": "^\\s*(style)\\.(scss)\\s+(\\{)", "beginCaptures": { "1": { "name": "storage.type.marko.css" }, "2": { "name": "storage.modifier.marko.css" }, "3": { "name": "punctuation.section.scope.begin.marko.css" } }, "comment": "SCSS style block, eg: style.scss { color: green }", "contentName": "source.scss", "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.scope.end.marko.css" } }, "name": "meta.embedded.scss", "patterns": [{ "include": "source.css.scss" }] }, { "begin": "^\\s*(?:(static )|(?=(?:class|import|export) ))", "beginCaptures": { "1": { "name": "keyword.control.static.marko" } }, "comment": "Top level blocks parsed as JavaScript", "contentName": "source.js", "end": "(?=\\n|$)", "name": "meta.embedded.js", "patterns": [{ "include": "#javascript-statement" }] }, { "include": "#content-concise-mode" }], "repository": { "attrs": { "patterns": [{ "applyEndPatternLast": 1, "begin": "(?:\\s+|,)(?:(key|on[a-zA-Z0-9_$-]+|[a-zA-Z0-9_$]+Change|no-update(?:-body)?(?:-if)?)|([a-zA-Z0-9_$][a-zA-Z0-9_$-]*))(:[a-zA-Z0-9_$][a-zA-Z0-9_$-]*)?", "beginCaptures": { "1": { "name": "support.type.attribute-name.marko" }, "2": { "name": "entity.other.attribute-name.marko" }, "3": { "name": "support.function.attribute-name.marko" } }, "comment": "Attribute with optional value", "end": "(?=.|$)", "name": "meta.marko-attribute", "patterns": [{ "include": "#html-args-or-method" }, { "applyEndPatternLast": 1, "begin": "\\s*(:?=)\\s*", "beginCaptures": { "1": { "patterns": [{ "include": "source.js" }] } }, "comment": "Attribute value", "contentName": "source.js", "end": "(?=.|$)", "name": "meta.embedded.js", "patterns": [{ "include": "#javascript-expression" }] }] }, { "applyEndPatternLast": 1, "begin": "(?:\\s+|,)\\.\\.\\.", "beginCaptures": { "1": { "name": "keyword.operator.spread.marko" } }, "comment": "A ...spread attribute", "contentName": "source.js", "end": "(?=.|$)", "name": "meta.marko-spread-attribute", "patterns": [{ "include": "#javascript-expression" }] }, { "begin": "\\s*(,(?!,))", "captures": { "1": { "patterns": [{ "include": "source.js" }] } }, "comment": "Consume any whitespace after a comma", "end": "(?!\\S)" }, { "include": "#javascript-comment-multiline" }, { "include": "#invalid" }] }, "concise-html-block": { "begin": "\\s*(--+)\\s*$", "beginCaptures": { "2": { "name": "punctuation.section.scope.begin.marko" } }, "comment": "--- HTML block within concise mode content. ---", "end": "\\1", "endCaptures": { "1": { "name": "punctuation.section.scope.end.marko" } }, "name": "meta.section.marko-html-block", "patterns": [{ "include": "#content-html-mode" }] }, "concise-html-line": { "captures": { "1": { "name": "punctuation.section.scope.begin.marko" }, "2": { "patterns": [{ "include": "#html-comments" }, { "include": "#tag-html" }, { "match": "\\\\.", "name": "string" }, { "include": "#placeholder" }, { "match": ".+?", "name": "string" }] } }, "comment": "-- HTML line within concise mode content. (content-html-mode w/o scriptlet)", "match": "\\s*(--+)(?=\\s+\\S)(.*$)", "name": "meta.section.marko-html-line" }, "conc
var marko = [
...css,
...less,
...scss,
...javascript,
lang
];
export { marko as default };