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

7 lines
44 KiB
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
const lang = Object.freeze({ "displayName": "D", "fileTypes": ["d", "di", "dpp"], "name": "d", "patterns": [{ "include": "#comment" }, { "include": "#type" }, { "include": "#statement" }, { "include": "#expression" }], "repository": { "aggregate-declaration": { "patterns": [{ "include": "#class-declaration" }, { "include": "#interface-declaration" }, { "include": "#struct-declaration" }, { "include": "#union-declaration" }, { "include": "#mixin-template-declaration" }, { "include": "#template-declaration" }] }, "alias-declaration": { "patterns": [{ "begin": "\\b(alias)\\b\\s*", "beginCaptures": { "1": { "name": "keyword.other.alias.d" } }, "end": ";", "endCaptures": { "0": { "name": "meta.alias.end.d" } }, "patterns": [{ "include": "#type" }, { "match": "=(?![=>])", "name": "keyword.operator.equal.alias.d" }, { "include": "#expression" }] }] }, "align-attribute": { "patterns": [{ "begin": "\\balign\\s*\\(", "end": "\\)", "name": "storage.modifier.align-attribute.d", "patterns": [{ "include": "#integer-literal" }] }, { "match": "\\balign\\b\\s*(?!\\()", "name": "storage.modifier.align-attribute.d" }] }, "alternate-wysiwyg-string": { "patterns": [{ "begin": "`", "end": "`[cwd]?", "name": "string.alternate-wysiwyg-string.d", "patterns": [{ "include": "#wysiwyg-characters" }] }] }, "arbitrary-delimited-string": { "begin": 'q"(\\w+)', "end": '\\1"', "name": "string.delimited.d", "patterns": [{ "match": ".", "name": "string.delimited.d" }] }, "arithmetic-expression": { "patterns": [{ "match": "\\^\\^|\\+\\+|--|(?<!/)\\+(?!/)|-|~|(?<!/)\\*(?!/)|(?<![+*/])/(?![+*/])|%", "name": "keyword.operator.numeric.d" }] }, "asm-instruction": { "patterns": [{ "include": "#comment" }, { "match": "\\b(align|even|naked|db|ds|di|dl|df|dd|de)\\b|:", "name": "keyword.asm-instruction.d" }, { "match": "\\b__LOCAL_SIZE\\b", "name": "constant.language.assembly.d" }, { "match": "\\b(offsetof|seg)\\b", "name": "support.type.assembly.d" }, { "include": "#asm-type-prefix" }, { "include": "#asm-primary-expression" }, { "include": "#operands" }, { "include": "#register" }, { "include": "#register-64" }, { "include": "#float-literal" }, { "include": "#integer-literal" }, { "include": "#identifier" }] }, "asm-statement": { "patterns": [{ "begin": "\\b(asm)\\b\\s*(?=\\{)", "captures": { "1": { "name": "keyword.control.switch.d" } }, "end": "(?<=\\})", "patterns": [{ "begin": "\\{", "beginCaptures": { "0": { "name": "keyword.control.asm.begin.d" } }, "contentName": "gfm.markup.raw.assembly.d", "end": "\\}", "endCaptures": { "0": { "name": "keyword.control.asm.end.d" } }, "patterns": [{ "include": "#asm-instruction" }] }] }] }, "asm-type-prefix": { "patterns": [{ "match": "\\b((near\\s+ptr)|(far\\s+ptr)|(byte\\s+ptr)|(short\\s+ptr)|(int\\s+ptr)|(word\\s+ptr)|(dword\\s+ptr)|(qword\\s+ptr)|(float\\s+ptr)|(double\\s+ptr)|(real\\s+ptr))\\b", "name": "support.type.asm-type-prefix.d" }] }, "assert-expression": { "patterns": [{ "begin": "\\bassert\\s*\\(", "beginCaptures": { "0": { "name": "keyword.other.assert.begin.d" } }, "end": "\\)", "endCaptures": { "0": { "name": "keyword.other.assert.end.d" } }, "patterns": [{ "include": "#comment" }, { "include": "#expression" }, { "include": "#comma" }] }] }, "assign-expression": { "patterns": [{ "match": ">>>=|\\^\\^=|>>=|<<=|~=|\\^=|\\|=|&=|%=|/=|\\*=|-=|\\+=|=(?!>)", "name": "keyword.operator.assign.d" }] }, "attribute": { "patterns": [{ "include": "#linkage-attribute" }, { "include": "#align-attribute" }, { "include": "#deprecated-attribute" }, { "include": "#protection-attribute" }, { "include": "#pragma" }, { "match": "\\b(static|extern|abstract|final|override|synchronized|auto|scope|const|immutable|inout|shared|__gshared|nothrow|pure|ref)\\b", "name": "entity.other.attribute-name.d" }, { "include": "#property" }] }, "base-type": { "patterns": [{ "match": "\\b(auto|bool|byte|ubyte|short|ushort|int|uint|long|ulong|char|wchar|dchar|float|double|real|ifloat|idouble|ireal|cfloat|cdouble|creal|void|noreturn)\\b", "name": "storage.type.basic-type.d" }, { "match": "\\b(string|wstring|dstring|size_t|ptrdiff_t)\\b(?!\\s*=)", "
var d = [
lang
];
export { d as default };