astro-ghostcms/.pnpm-store/v3/files/c3/d278335f7cceebdb6a9a8c47e89...

7 lines
23 KiB
Plaintext
Raw Normal View History

2024-02-14 14:10:47 +00:00
const lang = Object.freeze({ "displayName": "PowerShell", "name": "powershell", "patterns": [{ "begin": "<#", "beginCaptures": { "0": { "name": "punctuation.definition.comment.block.begin.powershell" } }, "end": "#>", "endCaptures": { "0": { "name": "punctuation.definition.comment.block.end.powershell" } }, "name": "comment.block.powershell", "patterns": [{ "include": "#commentEmbeddedDocs" }] }, { "match": "[2-6]>&1|>>|>|<<|<|>|>\\||[1-6]>|[1-6]>>", "name": "keyword.operator.redirection.powershell" }, { "include": "#commands" }, { "include": "#commentLine" }, { "include": "#variable" }, { "include": "#subexpression" }, { "include": "#function" }, { "include": "#attribute" }, { "include": "#UsingDirective" }, { "include": "#type" }, { "include": "#hashtable" }, { "include": "#doubleQuotedString" }, { "include": "#scriptblock" }, { "comment": "Needed to parse stuff correctly in 'argument mode'. (See about_parsing.)", "include": "#doubleQuotedStringEscapes" }, { "applyEndPatternLast": true, "begin": "['\\x{2018}-\\x{201B}]", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.powershell" } }, "end": "['\\x{2018}-\\x{201B}]", "endCaptures": { "0": { "name": "punctuation.definition.string.end.powershell" } }, "name": "string.quoted.single.powershell", "patterns": [{ "match": "['\\x{2018}-\\x{201B}]{2}", "name": "constant.character.escape.powershell" }] }, { "begin": '(@["\\x{201C}-\\x{201E}])\\s*$', "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.powershell" } }, "end": '^["\\x{201C}-\\x{201E}]@', "endCaptures": { "0": { "name": "punctuation.definition.string.end.powershell" } }, "name": "string.quoted.double.heredoc.powershell", "patterns": [{ "include": "#variableNoProperty" }, { "include": "#doubleQuotedStringEscapes" }, { "include": "#interpolation" }] }, { "begin": "(@['\\x{2018}-\\x{201B}])\\s*$", "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.powershell" } }, "end": "^['\\x{2018}-\\x{201B}]@", "endCaptures": { "0": { "name": "punctuation.definition.string.end.powershell" } }, "name": "string.quoted.single.heredoc.powershell" }, { "include": "#numericConstant" }, { "begin": "(@)(\\()", "beginCaptures": { "1": { "name": "keyword.other.array.begin.powershell" }, "2": { "name": "punctuation.section.group.begin.powershell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.group.end.powershell" } }, "name": "meta.group.array-expression.powershell", "patterns": [{ "include": "$self" }] }, { "begin": "((\\$))(\\()", "beginCaptures": { "1": { "name": "keyword.other.substatement.powershell" }, "2": { "name": "punctuation.definition.subexpression.powershell" }, "3": { "name": "punctuation.section.group.begin.powershell" } }, "comment": "TODO: move to repo; make recursive.", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.group.end.powershell" } }, "name": "meta.group.complex.subexpression.powershell", "patterns": [{ "include": "$self" }] }, { "match": "(\\b(([A-Za-z0-9\\-_\\.]+)\\.(?i:exe|com|cmd|bat))\\b)", "name": "support.function.powershell" }, { "match": "(?<!\\w|-|\\.)((?i:begin|break|catch|clean|continue|data|default|define|do|dynamicparam|else|elseif|end|exit|finally|for|from|if|in|inlinescript|parallel|param|process|return|sequence|switch|throw|trap|try|until|var|while)|%|\\?)(?!\\w)", "name": "keyword.control.powershell" }, { "match": "(?<!\\w|-|[^\\)]\\.)((?i:(foreach|where)(?!-object))|%|\\?)(?!\\w)", "name": "keyword.control.powershell" }, { "begin": "(?<!\\w)(--%)(?!\\w)", "beginCaptures": { "1": { "name": "keyword.control.powershell" } }, "comment": "This should be moved to the repository at some point.", "end": "$", "patterns": [{ "match": ".+", "name": "string.unquoted.powershell" }] }, { "comment": "This should only be relevant inside a class but will require a rework of how classes are matched. This is a temp fix.", "match": "(?<!\\w)((?i:hidden|static))(?!\\w)", "name": "storage.modifier.powershell" }, { "captures": { "1": { "name": "storage.type.powershell" }, "2": { "name": "entity.name.function" } },
var powershell = [
lang
];
export { powershell as default };