{ "information_for_contributors": [ "This file has been converted from https://github.com/PowerShell/EditorSyntax/blob/master/PowerShellSyntax.tmLanguage", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/PowerShell/EditorSyntax/commit/742f0b5d4b60f5930c0b47fcc1f646860521296e", "name": "PowerShell", "scopeName": "source.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" }, { "begin": "['\\x{2018}-\\x{201B}]", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.powershell" } }, "end": "['\\x{2018}-\\x{201B}]", "applyEndPatternLast": true, "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": "(?{1,5})}", "name": "constant.character.escape.powershell" }, { "match": "`u(?:\\{[0-9a-fA-F]{,6}.)?", "name": "invalid.character.escape.powershell" } ] }, "function": { "begin": "^(?:\\s*+)(?i)(function|filter|configuration|workflow)\\s+(?:(global|local|script|private):)?((?:\\p{L}|\\d|_|-|\\.)+)", "beginCaptures": { "0": { "name": "meta.function.powershell" }, "1": { "name": "storage.type.powershell" }, "2": { "name": "storage.modifier.scope.powershell" }, "3": { "name": "entity.name.function.powershell" } }, "end": "(?=\\{|\\()", "patterns": [ { "include": "#commentLine" } ] }, "subexpression": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.group.begin.powershell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.group.end.powershell" } }, "name": "meta.group.simple.subexpression.powershell", "patterns": [ { "include": "$self" } ] }, "interpolation": { "begin": "(((\\$)))((\\())", "beginCaptures": { "1": { "name": "keyword.other.substatement.powershell" }, "2": { "name": "punctuation.definition.substatement.powershell" }, "3": { "name": "punctuation.section.embedded.substatement.begin.powershell" }, "4": { "name": "punctuation.section.group.begin.powershell" }, "5": { "name": "punctuation.section.embedded.substatement.begin.powershell" } }, "contentName": "interpolated.complex.source.powershell", "end": "(\\))", "endCaptures": { "0": { "name": "punctuation.section.group.end.powershell" }, "1": { "name": "punctuation.section.embedded.substatement.end.powershell" } }, "name": "meta.embedded.substatement.powershell", "patterns": [ { "include": "$self" } ] }, "numericConstant": { "patterns": [ { "captures": { "1": { "name": "constant.numeric.hex.powershell" }, "2": { "name": "keyword.other.powershell" } }, "match": "(?