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

7 lines
14 KiB
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
const lang = Object.freeze({ "displayName": "Batch File", "injections": { "L:meta.block.repeat.batchfile": { "patterns": [{ "include": "#repeatParameter" }] } }, "name": "bat", "patterns": [{ "include": "#commands" }, { "include": "#comments" }, { "include": "#constants" }, { "include": "#controls" }, { "include": "#escaped_characters" }, { "include": "#labels" }, { "include": "#numbers" }, { "include": "#operators" }, { "include": "#parens" }, { "include": "#strings" }, { "include": "#variables" }], "repository": { "command_set": { "patterns": [{ "begin": "(?<=^|[\\s@])(?i:SET)(?=$|\\s)", "beginCaptures": { "0": { "name": "keyword.command.batchfile" } }, "end": "(?=$\\n|[&|><)])", "patterns": [{ "include": "#command_set_inside" }] }] }, "command_set_group": { "patterns": [{ "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.group.begin.batchfile" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.group.end.batchfile" } }, "patterns": [{ "include": "#command_set_inside_arithmetic" }] }] }, "command_set_inside": { "patterns": [{ "include": "#escaped_characters" }, { "include": "#variables" }, { "include": "#numbers" }, { "include": "#parens" }, { "include": "#command_set_strings" }, { "include": "#strings" }, { "begin": "([^ ][^=]*)(=)", "beginCaptures": { "1": { "name": "variable.other.readwrite.batchfile" }, "2": { "name": "keyword.operator.assignment.batchfile" } }, "end": "(?=$\\n|[&|><)])", "patterns": [{ "include": "#escaped_characters" }, { "include": "#variables" }, { "include": "#numbers" }, { "include": "#parens" }, { "include": "#strings" }] }, { "begin": "\\s+/[aA]\\s+", "end": "(?=$\\n|[&|><)])", "name": "meta.expression.set.batchfile", "patterns": [{ "begin": '"', "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.batchfile" } }, "end": '"', "endCaptures": { "0": { "name": "punctuation.definition.string.end.batchfile" } }, "name": "string.quoted.double.batchfile", "patterns": [{ "include": "#command_set_inside_arithmetic" }, { "include": "#command_set_group" }, { "include": "#variables" }] }, { "include": "#command_set_inside_arithmetic" }, { "include": "#command_set_group" }] }, { "begin": "\\s+/[pP]\\s+", "end": "(?=$\\n|[&|><)])", "patterns": [{ "include": "#command_set_strings" }, { "begin": "([^ ][^=]*)(=)", "beginCaptures": { "1": { "name": "variable.other.readwrite.batchfile" }, "2": { "name": "keyword.operator.assignment.batchfile" } }, "end": "(?=$\\n|[&|><)])", "name": "meta.prompt.set.batchfile", "patterns": [{ "include": "#strings" }] }] }] }, "command_set_inside_arithmetic": { "patterns": [{ "include": "#command_set_operators" }, { "include": "#numbers" }, { "match": ",", "name": "punctuation.separator.batchfile" }] }, "command_set_operators": { "patterns": [{ "captures": { "1": { "name": "variable.other.readwrite.batchfile" }, "2": { "name": "keyword.operator.assignment.augmented.batchfile" } }, "match": "([^ ]*)(\\+\\=|\\-\\=|\\*\\=|\\/\\=|%%\\=|&\\=|\\|\\=|\\^\\=|<<\\=|>>\\=)" }, { "match": "\\+|\\-|/|\\*|%%|\\||&|\\^|<<|>>|~", "name": "keyword.operator.arithmetic.batchfile" }, { "match": "!", "name": "keyword.operator.logical.batchfile" }, { "captures": { "1": { "name": "variable.other.readwrite.batchfile" }, "2": { "name": "keyword.operator.assignment.batchfile" } }, "match": "([^ =]*)(=)" }] }, "command_set_strings": { "patterns": [{ "begin": '(")\\s*([^ ][^=]*)(=)', "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.batchfile" }, "2": { "name": "variable.other.readwrite.batchfile" }, "3": { "name": "keyword.operator.assignment.batchfile" } }, "end": '"', "endCaptures": { "0": { "name": "punctuation.definition.string.end.batchfile" } }, "name": "string.quoted.double.batchfile", "patterns": [{ "include": "#variables" }, { "include": "#numbers" }, { "include": "#escaped_characters" }] }] }, "commands": { "patterns": [{ "match": "(?<=^|[\\s@])(?i:adprep|append|arp|assoc|at|atmadm|attrib|auditpol|autochk|autoconv|autofmt|bcdboot|bcdedit|bdehdcfg|bitsadmin|bootcfg|brea|cacls|cd|certreq|certutil|change|chcp|chdir|c
var bat = [
lang
];
export { bat as default };