Files
docs/node_modules/@shikijs/langs/dist/powershell.mjs

6 lines
22 KiB
JavaScript
Raw Normal View History

2025-08-27 14:05:33 +08:00
const lang = Object.freeze(JSON.parse("{\"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\"},{\"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\"}},\"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\"}},\"end\":\"$\",\"patterns\":[{\"match\":\".+\",\"name\":\"string.unquoted.powershell\"}]},{\"match\":\"(?<!\\\\w)((?i:hidden|static))(?!\\\\w)\",\"name\":\"storage.modifier.powershell\"},{\"captures\":{\"1\":{\"name\":\"storage.type.powershell\"},\"2\":{\"name\":\"entity.name.function\"}},\"match\":\"(?<!\\\\w|-)((?i:class)|%|\\\\?)(?:\\\\s)+((?:\\\\p{L}|\\\\d|_|-|)+)\\\\b\"},{\"match\":\"(?<!\\\\w)-(?i:is(?:not)?|as)\\\\b\",\"name\":\"keyword.operator.comparison.powersh
export default [
lang
]