6 lines
21 KiB
JavaScript
6 lines
21 KiB
JavaScript
|
|
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\":\"['‘-‛]\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.powershell\"}},\"end\":\"['‘-‛]\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.powershell\"}},\"name\":\"string.quoted.single.powershell\",\"patterns\":[{\"match\":\"['‘-‛]{2}\",\"name\":\"constant.character.escape.powershell\"}]},{\"begin\":\"(@[\\\"“”„])\\\\s*$\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.definition.string.begin.powershell\"}},\"end\":\"^[\\\"“”„]@\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.powershell\"}},\"name\":\"string.quoted.double.heredoc.powershell\",\"patterns\":[{\"include\":\"#variableNoProperty\"},{\"include\":\"#doubleQuotedStringEscapes\"},{\"include\":\"#interpolation\"}]},{\"begin\":\"(@['‘-‛])\\\\s*$\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.definition.string.begin.powershell\"}},\"end\":\"^['‘-‛]@\",\"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((([-.0-9A-Z_a-z]+)\\\\.(?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]?{1,})\\\\b\"},{\"match\":\"(?<!\\\\w)-(?i:is(?:not)?|as)\\\\b\",\"name\":\"keyword.operator.comparison.powershell\"},{\"match\":\"(?<!\\\\w)-(?i:[ci]?(?:eq|ne|[gl][et]|(?:not)?(?:like|match|contains|in)|replace))(?!\\\\p{L})\",\"name\":\"keyword.o
|
|||
|
|
|
|||
|
|
export default [
|
|||
|
|
lang
|
|||
|
|
]
|