2018-02-09 09:55:16 +00:00
{
"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."
] ,
2021-11-02 14:27:57 +00:00
"version" : "https://github.com/PowerShell/EditorSyntax/commit/742f0b5d4b60f5930c0b47fcc1f646860521296e" ,
2018-02-09 09:55:16 +00:00
"name" : "PowerShell" ,
2018-02-12 15:54:35 +00:00
"scopeName" : "source.powershell" ,
2018-02-09 09:55:16 +00:00
"patterns" : [
{
2018-02-27 10:57:41 +00:00
"begin" : "<#" ,
2018-02-09 09:55:16 +00:00
"beginCaptures" : {
2018-02-27 10:57:41 +00:00
"0" : {
2018-05-23 12:03:55 +00:00
"name" : "punctuation.definition.comment.block.begin.powershell"
2018-02-09 09:55:16 +00:00
}
} ,
2018-02-27 10:57:41 +00:00
"end" : "#>" ,
"endCaptures" : {
"0" : {
2018-05-23 12:03:55 +00:00
"name" : "punctuation.definition.comment.block.end.powershell"
2018-02-27 10:57:41 +00:00
}
} ,
"name" : "comment.block.powershell" ,
2018-02-09 09:55:16 +00:00
"patterns" : [
{
2018-02-27 10:57:41 +00:00
"include" : "#commentEmbeddedDocs"
2018-02-09 09:55:16 +00:00
}
]
} ,
{
2018-02-27 10:57:41 +00:00
"match" : "[2-6]>&1|>>|>|<<|<|>|>\\||[1-6]>|[1-6]>>" ,
"name" : "keyword.operator.redirection.powershell"
2018-02-09 09:55:16 +00:00
} ,
{
2018-02-27 10:57:41 +00:00
"include" : "#commands"
2018-02-09 09:55:16 +00:00
} ,
2018-05-23 12:03:55 +00:00
{
"include" : "#commentLine"
} ,
2018-02-09 09:55:16 +00:00
{
2018-02-27 10:57:41 +00:00
"include" : "#variable"
2018-02-09 09:55:16 +00:00
} ,
{
2021-03-29 13:10:29 +00:00
"include" : "#subexpression"
2018-02-09 09:55:16 +00:00
} ,
{
"include" : "#function"
} ,
{
2018-02-27 10:57:41 +00:00
"include" : "#attribute"
2018-02-09 09:55:16 +00:00
} ,
2018-05-14 12:14:19 +00:00
{
"include" : "#UsingDirective"
} ,
2018-02-09 09:55:16 +00:00
{
2018-02-27 10:57:41 +00:00
"include" : "#type"
2018-02-09 09:55:16 +00:00
} ,
2018-05-14 12:14:19 +00:00
{
"include" : "#hashtable"
} ,
2018-02-09 09:55:16 +00:00
{
2018-05-23 12:03:55 +00:00
"include" : "#doubleQuotedString"
} ,
{
"include" : "#scriptblock"
2018-02-09 09:55:16 +00:00
} ,
2018-02-27 10:57:41 +00:00
{
"comment" : "Needed to parse stuff correctly in 'argument mode'. (See about_parsing.)" ,
"include" : "#doubleQuotedStringEscapes"
2018-02-09 09:55:16 +00:00
} ,
2018-02-27 10:57:41 +00:00
{
2021-03-29 13:10:29 +00:00
"begin" : "['\\x{2018}-\\x{201B}]" ,
2018-10-04 10:00:39 +00:00
"beginCaptures" : {
"0" : {
"name" : "punctuation.definition.string.begin.powershell"
}
} ,
2021-03-29 13:10:29 +00:00
"end" : "['\\x{2018}-\\x{201B}]" ,
"applyEndPatternLast" : true ,
2018-10-04 10:00:39 +00:00
"endCaptures" : {
"0" : {
"name" : "punctuation.definition.string.end.powershell"
}
} ,
2018-02-27 10:57:41 +00:00
"name" : "string.quoted.single.powershell" ,
2018-02-09 09:55:16 +00:00
"patterns" : [
{
2021-03-29 13:10:29 +00:00
"match" : "['\\x{2018}-\\x{201B}]{2}" ,
2018-02-27 10:57:41 +00:00
"name" : "constant.character.escape.powershell"
2018-02-09 09:55:16 +00:00
}
]
} ,
2018-02-27 10:57:41 +00:00
{
2021-03-29 13:10:29 +00:00
"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"
}
} ,
2018-02-27 10:57:41 +00:00
"name" : "string.quoted.double.heredoc.powershell" ,
2018-02-09 09:55:16 +00:00
"patterns" : [
{
2018-02-27 10:57:41 +00:00
"include" : "#variableNoProperty"
2018-02-09 09:55:16 +00:00
} ,
{
2018-02-27 10:57:41 +00:00
"include" : "#doubleQuotedStringEscapes"
2018-02-09 09:55:16 +00:00
} ,
{
2018-02-27 10:57:41 +00:00
"include" : "#interpolation"
2018-02-09 09:55:16 +00:00
}
]
} ,
2018-02-27 10:57:41 +00:00
{
2021-03-29 13:10:29 +00:00
"begin" : "(@['\\x{2018}-\\x{201B}])\\s*$" ,
"beginCaptures" : {
"1" : {
"name" : "punctuation.definition.string.begin.powershell"
2018-02-09 09:55:16 +00:00
}
2021-03-29 13:10:29 +00:00
} ,
"end" : "^['\\x{2018}-\\x{201B}]@" ,
"endCaptures" : {
"0" : {
"name" : "punctuation.definition.string.end.powershell"
}
} ,
"name" : "string.quoted.single.heredoc.powershell"
2018-02-09 09:55:16 +00:00
} ,
2018-02-27 10:57:41 +00:00
{
"include" : "#numericConstant"
2018-02-09 09:55:16 +00:00
} ,
2018-02-27 10:57:41 +00:00
{
2018-05-23 12:03:55 +00:00
"begin" : "(@)(\\()" ,
"beginCaptures" : {
"1" : {
"name" : "keyword.other.array.begin.powershell"
} ,
"2" : {
"name" : "punctuation.section.group.begin.powershell"
2018-02-09 09:55:16 +00:00
}
} ,
2018-02-27 10:57:41 +00:00
"end" : "\\)" ,
2018-05-23 12:03:55 +00:00
"endCaptures" : {
"0" : {
"name" : "punctuation.section.group.end.powershell"
}
} ,
2018-02-27 10:57:41 +00:00
"name" : "meta.group.array-expression.powershell" ,
"patterns" : [
{
"include" : "$self"
}
]
2018-02-09 09:55:16 +00:00
} ,
2018-02-27 10:57:41 +00:00
{
2021-03-29 13:10:29 +00:00
"begin" : "((\\$))(\\()" ,
2018-05-23 12:03:55 +00:00
"beginCaptures" : {
"1" : {
2021-03-29 13:10:29 +00:00
"name" : "keyword.other.substatement.powershell"
2018-05-23 12:03:55 +00:00
} ,
"2" : {
2021-03-29 13:10:29 +00:00
"name" : "punctuation.definition.subexpression.powershell"
} ,
"3" : {
2018-05-23 12:03:55 +00:00
"name" : "punctuation.section.group.begin.powershell"
2018-02-09 09:55:16 +00:00
}
} ,
2018-02-27 10:57:41 +00:00
"comment" : "TODO: move to repo; make recursive." ,
"end" : "\\)" ,
2018-05-23 12:03:55 +00:00
"endCaptures" : {
"0" : {
"name" : "punctuation.section.group.end.powershell"
}
} ,
2018-02-27 10:57:41 +00:00
"name" : "meta.group.complex.subexpression.powershell" ,
"patterns" : [
{
"include" : "$self"
}
]
} ,
{
"match" : "(\\b(([A-Za-z0-9\\-_\\.]+)\\.(?i:exe|com|cmd|bat))\\b)" ,
2018-02-09 09:55:16 +00:00
"name" : "support.function.powershell"
} ,
2018-02-27 10:57:41 +00:00
{
2021-11-02 14:27:57 +00:00
"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)" ,
2018-06-11 11:03:21 +00:00
"name" : "keyword.control.powershell"
} ,
{
"match" : "(?<!\\w|-|[^\\)]\\.)((?i:(foreach|where)(?!-object))|%|\\?)(?!\\w)" ,
2018-05-23 12:03:55 +00:00
"name" : "keyword.control.powershell"
} ,
{
2018-10-04 10:00:39 +00:00
"begin" : "(?<!\\w)(--%)(?!\\w)" ,
"beginCaptures" : {
"1" : {
"name" : "keyword.control.powershell"
}
} ,
"end" : "$" ,
"patterns" : [
{
"match" : ".+" ,
"name" : "string.unquoted.powershell"
}
] ,
"comment" : "This should be moved to the repository at some point."
2018-02-27 10:57:41 +00:00
} ,
2018-05-14 12:14:19 +00:00
{
"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"
} ,
2018-02-27 10:57:41 +00:00
{
"captures" : {
2018-02-09 09:55:16 +00:00
"1" : {
2018-02-27 10:57:41 +00:00
"name" : "storage.type.powershell"
2018-02-09 09:55:16 +00:00
} ,
"2" : {
2018-02-27 10:57:41 +00:00
"name" : "entity.name.function"
2018-02-09 09:55:16 +00:00
}
} ,
2018-02-27 10:57:41 +00:00
"comment" : "capture should be entity.name.type, but it doesn't provide a good color in the default schema." ,
2018-06-11 11:03:21 +00:00
"match" : "(?<!\\w|-)((?i:class)|%|\\?)(?:\\s)+((?:\\p{L}|\\d|_|-|)+)\\b"
2018-02-09 09:55:16 +00:00
} ,
2018-02-27 10:57:41 +00:00
{
"match" : "(?<!\\w)-(?i:is(?:not)?|as)\\b" ,
"name" : "keyword.operator.comparison.powershell"
2018-02-09 09:55:16 +00:00
} ,
2018-02-27 10:57:41 +00:00
{
"match" : "(?<!\\w)-(?i:[ic]?(?:eq|ne|[gl][te]|(?:not)?(?:like|match|contains|in)|replace))(?!\\p{L})" ,
"name" : "keyword.operator.comparison.powershell"
2018-02-09 09:55:16 +00:00
} ,
2018-02-27 10:57:41 +00:00
{
"match" : "(?<!\\w)-(?i:join|split)(?!\\p{L})|!" ,
"name" : "keyword.operator.unary.powershell"
2018-02-09 09:55:16 +00:00
} ,
2018-02-27 10:57:41 +00:00
{
"match" : "(?<!\\w)-(?i:and|or|not|xor)(?!\\p{L})|!" ,
"name" : "keyword.operator.logical.powershell"
2018-02-09 09:55:16 +00:00
} ,
2018-02-27 10:57:41 +00:00
{
2018-06-11 11:03:21 +00:00
"match" : "(?<!\\w)-(?i:band|bor|bnot|bxor|shl|shr)(?!\\p{L})" ,
2018-02-27 10:57:41 +00:00
"name" : "keyword.operator.bitwise.powershell"
2018-02-09 09:55:16 +00:00
} ,
2018-02-27 10:57:41 +00:00
{
"match" : "(?<!\\w)-(?i:f)(?!\\p{L})" ,
"name" : "keyword.operator.string-format.powershell"
2018-02-09 09:55:16 +00:00
} ,
2018-02-27 10:57:41 +00:00
{
"match" : "[+%*/-]?=|[+/*%-]" ,
"name" : "keyword.operator.assignment.powershell"
2018-02-09 09:55:16 +00:00
} ,
2018-02-27 10:57:41 +00:00
{
"match" : "\\|{2}|&{2}|;" ,
2018-10-04 10:00:39 +00:00
"name" : "punctuation.terminator.statement.powershell"
2018-02-09 09:55:16 +00:00
} ,
2018-02-27 10:57:41 +00:00
{
"match" : "&|(?<!\\w)\\.(?= )|`|,|\\|" ,
"name" : "keyword.operator.other.powershell"
} ,
{
"comment" : "This is very imprecise, is there a syntax for 'must come after...' " ,
2018-05-23 12:03:55 +00:00
"match" : "(?<!\\s|^)\\.\\.(?=\\-?\\d|\\(|\\$)" ,
2018-02-27 10:57:41 +00:00
"name" : "keyword.operator.range.powershell"
}
] ,
"repository" : {
2018-05-23 12:03:55 +00:00
"commentLine" : {
2021-03-29 13:10:29 +00:00
"begin" : "(?<![`\\\\-])(#)#*" ,
2018-05-23 12:03:55 +00:00
"captures" : {
2021-03-29 13:10:29 +00:00
"1" : {
2018-05-23 12:03:55 +00:00
"name" : "punctuation.definition.comment.powershell"
}
} ,
2018-10-04 10:00:39 +00:00
"end" : "$\\n?" ,
2018-05-23 12:03:55 +00:00
"name" : "comment.line.powershell" ,
"patterns" : [
{
"include" : "#commentEmbeddedDocs"
2018-02-09 09:55:16 +00:00
} ,
2018-05-23 12:03:55 +00:00
{
"include" : "#RequiresDirective"
}
]
} ,
"attribute" : {
2019-05-16 17:17:43 +00:00
"begin" : "(\\[)\\s*\\b(?i)(cmdletbinding|alias|outputtype|parameter|validatenotnull|validatenotnullorempty|validatecount|validateset|allownull|allowemptycollection|allowemptystring|validatescript|validaterange|validatepattern|validatelength|supportswildcards)\\b" ,
2018-05-23 12:03:55 +00:00
"beginCaptures" : {
2018-02-27 10:57:41 +00:00
"1" : {
2018-05-23 12:03:55 +00:00
"name" : "punctuation.section.bracket.begin.powershell"
} ,
"2" : {
"name" : "support.function.attribute.powershell"
2018-02-27 10:57:41 +00:00
}
} ,
2018-05-23 12:03:55 +00:00
"end" : "(\\])" ,
2018-02-27 10:57:41 +00:00
"endCaptures" : {
2018-05-23 12:03:55 +00:00
"1" : {
"name" : "punctuation.section.bracket.end.powershell"
2018-02-27 10:57:41 +00:00
}
} ,
2018-05-23 12:03:55 +00:00
"name" : "meta.attribute.powershell" ,
2018-02-27 10:57:41 +00:00
"patterns" : [
2018-02-09 09:55:16 +00:00
{
2018-02-27 10:57:41 +00:00
"begin" : "\\(" ,
2018-05-23 12:03:55 +00:00
"beginCaptures" : {
"0" : {
"name" : "punctuation.section.group.begin.powershell"
}
} ,
2018-02-27 10:57:41 +00:00
"end" : "\\)" ,
2018-05-23 12:03:55 +00:00
"endCaptures" : {
"0" : {
"name" : "punctuation.section.group.end.powershell"
}
} ,
2018-02-27 10:57:41 +00:00
"patterns" : [
2018-05-23 12:03:55 +00:00
{
"include" : "$self"
} ,
{
2018-06-11 11:03:21 +00:00
"match" : "(?i)\\b(mandatory|valuefrompipeline|valuefrompipelinebypropertyname|valuefromremainingarguments|position|parametersetname|defaultparametersetname|supportsshouldprocess|supportspaging|positionalbinding|helpuri|confirmimpact|helpmessage)\\b(?:\\s+)?(=)?" ,
2018-02-27 10:57:41 +00:00
"captures" : {
"1" : {
2018-05-23 12:03:55 +00:00
"name" : "variable.parameter.attribute.powershell"
2018-02-27 10:57:41 +00:00
} ,
"2" : {
2018-05-23 12:03:55 +00:00
"name" : "keyword.operator.assignment.powershell"
2018-02-27 10:57:41 +00:00
}
2018-05-23 12:03:55 +00:00
}
2018-02-27 10:57:41 +00:00
}
]
2018-02-09 09:55:16 +00:00
}
]
} ,
2018-02-27 10:57:41 +00:00
"commands" : {
2018-02-09 09:55:16 +00:00
"patterns" : [
{
2018-02-27 10:57:41 +00:00
"comment" : "Verb-Noun pattern:" ,
2018-05-14 12:14:19 +00:00
"match" : "(?:(\\p{L}|\\d|_|-|\\\\|\\:)*\\\\)?\\b(?i:Add|Approve|Assert|Backup|Block|Build|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Deploy|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Mount|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Write)\\-.+?(?:\\.(?i:exe|cmd|bat|ps1))?\\b" ,
2018-02-27 10:57:41 +00:00
"name" : "support.function.powershell"
2018-02-09 09:55:16 +00:00
} ,
{
2018-02-27 10:57:41 +00:00
"comment" : "Builtin cmdlets with reserved verbs" ,
"match" : "(?<!\\w)(?i:foreach-object)(?!\\w)" ,
"name" : "support.function.powershell"
2018-02-09 09:55:16 +00:00
} ,
{
2018-02-27 10:57:41 +00:00
"comment" : "Builtin cmdlets with reserved verbs" ,
"match" : "(?<!\\w)(?i:where-object)(?!\\w)" ,
"name" : "support.function.powershell"
2018-05-14 12:14:19 +00:00
} ,
{
"comment" : "Builtin cmdlets with reserved verbs" ,
"match" : "(?<!\\w)(?i:sort-object)(?!\\w)" ,
"name" : "support.function.powershell"
} ,
{
"comment" : "Builtin cmdlets with reserved verbs" ,
"match" : "(?<!\\w)(?i:tee-object)(?!\\w)" ,
"name" : "support.function.powershell"
2018-02-09 09:55:16 +00:00
}
]
} ,
2018-02-27 10:57:41 +00:00
"commentEmbeddedDocs" : {
2018-02-09 09:55:16 +00:00
"patterns" : [
{
2018-02-27 10:57:41 +00:00
"captures" : {
"1" : {
"name" : "constant.string.documentation.powershell"
} ,
"2" : {
"name" : "keyword.operator.documentation.powershell"
}
} ,
2021-03-29 13:10:29 +00:00
"comment" : "these embedded doc keywords do not support arguments, must be the only thing on the line" ,
"match" : "(?:^|\\G)(?i:\\s*(\\.)(COMPONENT|DESCRIPTION|EXAMPLE|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|ROLE|SYNOPSIS))\\s*$" ,
2018-02-27 10:57:41 +00:00
"name" : "comment.documentation.embedded.powershell"
2018-02-09 09:55:16 +00:00
} ,
{
2018-02-27 10:57:41 +00:00
"captures" : {
"1" : {
"name" : "constant.string.documentation.powershell"
} ,
"2" : {
"name" : "keyword.operator.documentation.powershell"
} ,
"3" : {
"name" : "keyword.operator.documentation.powershell"
}
} ,
2021-03-29 13:10:29 +00:00
"comment" : "these embedded doc keywords require arguments though the type required may be inconsistent, they may not all be able to use the same argument match" ,
"match" : "(?:^|\\G)(?i:\\s*(\\.)(EXTERNALHELP|FORWARDHELP(?:CATEGORY|TARGETNAME)|PARAMETER|REMOTEHELPRUNSPACE))\\s+(.+?)\\s*$" ,
2018-02-27 10:57:41 +00:00
"name" : "comment.documentation.embedded.powershell"
2018-02-09 09:55:16 +00:00
}
]
} ,
2018-02-27 10:57:41 +00:00
"doubleQuotedStringEscapes" : {
2018-02-09 09:55:16 +00:00
"patterns" : [
{
2021-03-29 13:10:29 +00:00
"match" : "`[`0abefnrtv'\"\\x{2018}-\\x{201E}$]" ,
2018-02-09 09:55:16 +00:00
"name" : "constant.character.escape.powershell"
} ,
2019-05-16 17:17:43 +00:00
{
"include" : "#unicodeEscape"
2018-02-09 09:55:16 +00:00
}
]
} ,
2019-05-16 17:17:43 +00:00
"unicodeEscape" : {
"comment" : "`u{xxxx} added in PowerShell 6.0" ,
"patterns" : [
{
"match" : "`u\\{(?:(?:10)?([0-9a-fA-F]){1,4}|0?\\g<1>{1,5})}" ,
"name" : "constant.character.escape.powershell"
} ,
{
"match" : "`u(?:\\{[0-9a-fA-F]{,6}.)?" ,
"name" : "invalid.character.escape.powershell"
}
]
} ,
2018-02-27 10:57:41 +00:00
"function" : {
2018-05-14 12:14:19 +00:00
"begin" : "^(?:\\s*+)(?i)(function|filter|configuration|workflow)\\s+(?:(global|local|script|private):)?((?:\\p{L}|\\d|_|-|\\.)+)" ,
2018-02-27 10:57:41 +00:00
"beginCaptures" : {
"0" : {
2018-05-23 12:03:55 +00:00
"name" : "meta.function.powershell"
2018-02-27 10:57:41 +00:00
} ,
"1" : {
2018-05-23 12:03:55 +00:00
"name" : "storage.type.powershell"
2018-02-27 10:57:41 +00:00
} ,
"2" : {
"name" : "storage.modifier.scope.powershell"
} ,
"3" : {
"name" : "entity.name.function.powershell"
2018-02-09 09:55:16 +00:00
}
2018-02-27 10:57:41 +00:00
} ,
2018-05-23 12:03:55 +00:00
"end" : "(?=\\{|\\()" ,
"patterns" : [
{
"include" : "#commentLine"
}
]
2018-02-09 09:55:16 +00:00
} ,
2021-03-29 13:10:29 +00:00
"subexpression" : {
2018-02-27 10:57:41 +00:00
"begin" : "\\(" ,
"beginCaptures" : {
"0" : {
2018-05-23 12:03:55 +00:00
"name" : "punctuation.section.group.begin.powershell"
2018-02-27 10:57:41 +00:00
}
} ,
"end" : "\\)" ,
"endCaptures" : {
"0" : {
2018-05-23 12:03:55 +00:00
"name" : "punctuation.section.group.end.powershell"
2018-02-27 10:57:41 +00:00
}
} ,
2021-03-29 13:10:29 +00:00
"name" : "meta.group.simple.subexpression.powershell" ,
2018-02-09 09:55:16 +00:00
"patterns" : [
{
2018-02-27 10:57:41 +00:00
"include" : "$self"
2018-02-09 09:55:16 +00:00
}
]
} ,
2018-02-27 10:57:41 +00:00
"interpolation" : {
2021-03-29 13:10:29 +00:00
"begin" : "(((\\$)))((\\())" ,
2018-02-27 10:57:41 +00:00
"beginCaptures" : {
2018-05-23 12:03:55 +00:00
"1" : {
2021-03-29 13:10:29 +00:00
"name" : "keyword.other.substatement.powershell"
2018-05-23 12:03:55 +00:00
} ,
"2" : {
2021-03-29 13:10:29 +00:00
"name" : "punctuation.definition.substatement.powershell"
} ,
"3" : {
"name" : "punctuation.section.embedded.substatement.begin.powershell"
} ,
"4" : {
2018-05-23 12:03:55 +00:00
"name" : "punctuation.section.group.begin.powershell"
2021-03-29 13:10:29 +00:00
} ,
"5" : {
"name" : "punctuation.section.embedded.substatement.begin.powershell"
2018-02-27 10:57:41 +00:00
}
} ,
"contentName" : "interpolated.complex.source.powershell" ,
2021-03-29 13:10:29 +00:00
"end" : "(\\))" ,
2018-02-27 10:57:41 +00:00
"endCaptures" : {
2018-02-09 09:55:16 +00:00
"0" : {
2018-05-23 12:03:55 +00:00
"name" : "punctuation.section.group.end.powershell"
2021-03-29 13:10:29 +00:00
} ,
"1" : {
"name" : "punctuation.section.embedded.substatement.end.powershell"
2018-02-09 09:55:16 +00:00
}
} ,
2021-03-29 13:10:29 +00:00
"name" : "meta.embedded.substatement.powershell" ,
2018-02-09 09:55:16 +00:00
"patterns" : [
{
"include" : "$self"
}
]
} ,
2018-02-27 10:57:41 +00:00
"numericConstant" : {
2018-02-09 09:55:16 +00:00
"patterns" : [
{
"captures" : {
"1" : {
2018-05-23 12:03:55 +00:00
"name" : "constant.numeric.hex.powershell"
2018-02-09 09:55:16 +00:00
} ,
"2" : {
2018-02-27 10:57:41 +00:00
"name" : "keyword.other.powershell"
2018-02-09 09:55:16 +00:00
}
} ,
2018-05-23 12:03:55 +00:00
"match" : "(?<!\\w)([-+]?0(?:x|X)[0-9a-fA-F_]+(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?i:[kmgtp]b)?)\\b"
2018-02-09 09:55:16 +00:00
} ,
{
"captures" : {
"1" : {
2018-05-23 12:03:55 +00:00
"name" : "constant.numeric.integer.powershell"
2018-02-09 09:55:16 +00:00
} ,
"2" : {
2018-05-14 12:14:19 +00:00
"name" : "keyword.other.powershell"
}
} ,
2018-05-23 12:03:55 +00:00
"match" : "(?<!\\w)([-+]?(?:[0-9_]+)?\\.[0-9_]+(?:(?:e|E)[0-9]+)?(?:F|f|D|d|M|m)?)((?i:[kmgtp]b)?)\\b"
2018-05-14 12:14:19 +00:00
} ,
{
"captures" : {
"1" : {
2018-05-23 12:03:55 +00:00
"name" : "constant.numeric.octal.powershell"
2018-02-09 09:55:16 +00:00
} ,
2018-05-14 12:14:19 +00:00
"2" : {
"name" : "keyword.other.powershell"
}
} ,
2018-05-23 12:03:55 +00:00
"match" : "(?<!\\w)([-+]?0(?:b|B)[01_]+(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?i:[kmgtp]b)?)\\b"
2018-05-14 12:14:19 +00:00
} ,
{
"captures" : {
"1" : {
2018-05-23 12:03:55 +00:00
"name" : "constant.numeric.integer.powershell"
2018-02-27 10:57:41 +00:00
} ,
2018-05-14 12:14:19 +00:00
"2" : {
2018-02-27 10:57:41 +00:00
"name" : "keyword.other.powershell"
2018-05-14 12:14:19 +00:00
}
} ,
2018-05-23 12:03:55 +00:00
"match" : "(?<!\\w)([-+]?[0-9_]+(?:e|E)(?:[0-9_])?+(?:F|f|D|d|M|m)?)((?i:[kmgtp]b)?)\\b"
2018-05-14 12:14:19 +00:00
} ,
{
"captures" : {
"1" : {
2018-05-23 12:03:55 +00:00
"name" : "constant.numeric.integer.powershell"
2018-02-27 10:57:41 +00:00
} ,
2018-05-14 12:14:19 +00:00
"2" : {
2018-02-27 10:57:41 +00:00
"name" : "keyword.other.powershell"
2018-02-09 09:55:16 +00:00
}
} ,
2018-05-23 12:03:55 +00:00
"match" : "(?<!\\w)([-+]?[0-9_]+\\.(?:e|E)(?:[0-9_])?+(?:F|f|D|d|M|m)?)((?i:[kmgtp]b)?)\\b"
2018-05-14 12:14:19 +00:00
} ,
{
"captures" : {
"1" : {
2018-05-23 12:03:55 +00:00
"name" : "constant.numeric.integer.powershell"
2018-05-14 12:14:19 +00:00
} ,
"2" : {
"name" : "keyword.other.powershell"
}
} ,
2018-05-23 12:03:55 +00:00
"match" : "(?<!\\w)([-+]?[0-9_]+[\\.]?(?:F|f|D|d|M|m))((?i:[kmgtp]b)?)\\b"
2018-05-14 12:14:19 +00:00
} ,
{
"captures" : {
"1" : {
2018-05-23 12:03:55 +00:00
"name" : "constant.numeric.integer.powershell"
2018-05-14 12:14:19 +00:00
} ,
"2" : {
"name" : "keyword.other.powershell"
}
} ,
2018-05-23 12:03:55 +00:00
"match" : "(?<!\\w)([-+]?[0-9_]+[\\.]?(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?i:[kmgtp]b)?)\\b"
2018-02-27 10:57:41 +00:00
}
]
} ,
"scriptblock" : {
"begin" : "\\{" ,
2018-05-23 12:03:55 +00:00
"beginCaptures" : {
"0" : {
"name" : "punctuation.section.braces.begin.powershell"
}
} ,
2018-02-27 10:57:41 +00:00
"end" : "\\}" ,
2018-05-23 12:03:55 +00:00
"endCaptures" : {
"0" : {
"name" : "punctuation.section.braces.end.powershell"
}
} ,
2018-02-27 10:57:41 +00:00
"name" : "meta.scriptblock.powershell" ,
"patterns" : [
{
"include" : "$self"
2018-02-09 09:55:16 +00:00
}
]
} ,
"type" : {
"begin" : "\\[" ,
"beginCaptures" : {
"0" : {
2018-05-23 12:03:55 +00:00
"name" : "punctuation.section.bracket.begin.powershell"
2018-02-09 09:55:16 +00:00
}
} ,
2018-02-27 10:57:41 +00:00
"end" : "\\]" ,
2018-02-09 09:55:16 +00:00
"endCaptures" : {
2018-02-27 10:57:41 +00:00
"0" : {
2018-05-23 12:03:55 +00:00
"name" : "punctuation.section.bracket.end.powershell"
2018-02-09 09:55:16 +00:00
}
} ,
"patterns" : [
{
2018-05-23 12:03:55 +00:00
"match" : "(?!\\d+|\\.)(?:\\p{L}|\\p{N}|\\.)+" ,
"name" : "storage.type.powershell"
2018-02-09 09:55:16 +00:00
} ,
{
"include" : "$self"
}
]
} ,
"variable" : {
"patterns" : [
{
2018-02-27 10:57:41 +00:00
"captures" : {
2018-10-04 10:00:39 +00:00
"0" : {
2018-08-15 16:38:23 +00:00
"name" : "constant.language.powershell"
2018-10-04 10:00:39 +00:00
} ,
"1" : {
"name" : "punctuation.definition.variable.powershell"
2018-02-27 10:57:41 +00:00
}
} ,
"comment" : "These are special constants." ,
"match" : "(\\$)(?i:(False|Null|True))\\b"
2018-02-09 09:55:16 +00:00
} ,
{
"captures" : {
2018-10-04 10:00:39 +00:00
"0" : {
2018-08-15 16:38:23 +00:00
"name" : "support.constant.variable.powershell"
2018-07-09 09:57:24 +00:00
} ,
2018-10-04 10:00:39 +00:00
"1" : {
"name" : "punctuation.definition.variable.powershell"
} ,
2018-02-09 09:55:16 +00:00
"3" : {
2018-10-04 10:00:39 +00:00
"name" : "variable.other.member.powershell"
2018-02-09 09:55:16 +00:00
}
} ,
2018-02-27 10:57:41 +00:00
"comment" : "These are the other built-in constants." ,
"match" : "(\\$)(?i:(Error|ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?\\b"
2018-02-09 09:55:16 +00:00
} ,
{
"captures" : {
2018-10-04 10:00:39 +00:00
"0" : {
2019-05-16 17:17:43 +00:00
"name" : "support.variable.automatic.powershell"
2018-07-09 09:57:24 +00:00
} ,
2018-10-04 10:00:39 +00:00
"1" : {
"name" : "punctuation.definition.variable.powershell"
} ,
2018-02-09 09:55:16 +00:00
"3" : {
2018-10-04 10:00:39 +00:00
"name" : "variable.other.member.powershell"
2018-02-27 10:57:41 +00:00
}
} ,
"comment" : "Automatic variables are not constants, but they are read-only. In monokai (default) color schema support.variable doesn't have color, so we use constant." ,
2019-05-16 17:17:43 +00:00
"match" : "(\\$)((?:[$^?])|(?i:_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This)\\b)((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?"
2018-02-27 10:57:41 +00:00
} ,
{
"captures" : {
2018-10-04 10:00:39 +00:00
"0" : {
2018-08-15 16:38:23 +00:00
"name" : "variable.language.powershell"
2018-07-09 09:57:24 +00:00
} ,
2018-10-04 10:00:39 +00:00
"1" : {
"name" : "punctuation.definition.variable.powershell"
} ,
2018-02-27 10:57:41 +00:00
"3" : {
2018-10-04 10:00:39 +00:00
"name" : "variable.other.member.powershell"
2018-02-09 09:55:16 +00:00
}
} ,
2018-02-27 10:57:41 +00:00
"comment" : "Style preference variables as language variables so that they stand out." ,
2019-08-05 10:44:23 +00:00
"match" : "(\\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|InformationPreference|LogCommandHealthEvent|LogCommandLifecycleEvent|LogEngineHealthEvent|LogEngineLifecycleEvent|LogProviderHealthEvent|LogProviderLifecycleEvent|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|PSCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoLoadingPreference|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|ProgressPreference|VerbosePreference|WarningPreference|WhatIfPreference))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?\\b"
2018-02-09 09:55:16 +00:00
} ,
{
"captures" : {
2018-10-04 10:00:39 +00:00
"0" : {
"name" : "variable.other.readwrite.powershell"
} ,
2018-02-09 09:55:16 +00:00
"1" : {
2018-10-04 10:00:39 +00:00
"name" : "punctuation.definition.variable.powershell"
2018-02-09 09:55:16 +00:00
} ,
"2" : {
2018-02-27 10:57:41 +00:00
"name" : "storage.modifier.scope.powershell"
2018-02-09 09:55:16 +00:00
} ,
"4" : {
2018-10-04 10:00:39 +00:00
"name" : "variable.other.member.powershell"
2018-02-27 10:57:41 +00:00
}
} ,
2018-05-14 12:14:19 +00:00
"match" : "(?i:(\\$|@)(global|local|private|script|using|workflow):((?:\\p{L}|\\d|_)+))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?"
2018-02-27 10:57:41 +00:00
} ,
{
"captures" : {
2018-10-04 10:00:39 +00:00
"0" : {
"name" : "variable.other.readwrite.powershell"
} ,
2018-02-27 10:57:41 +00:00
"1" : {
2018-10-04 10:00:39 +00:00
"name" : "punctuation.definition.variable.powershell"
2018-02-27 10:57:41 +00:00
} ,
"2" : {
2018-05-23 12:03:55 +00:00
"name" : "punctuation.section.braces.begin.powershell"
2018-02-27 10:57:41 +00:00
} ,
"3" : {
2018-05-23 12:03:55 +00:00
"name" : "storage.modifier.scope.powershell"
2018-02-09 09:55:16 +00:00
} ,
"5" : {
2018-05-23 12:03:55 +00:00
"name" : "punctuation.section.braces.end.powershell"
} ,
"6" : {
2018-10-04 10:00:39 +00:00
"name" : "variable.other.member.powershell"
2018-02-27 10:57:41 +00:00
}
} ,
2018-05-23 12:03:55 +00:00
"match" : "(?i:(\\$)(\\{)(global|local|private|script|using|workflow):([^}]*[^}`])(\\}))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?"
2018-02-27 10:57:41 +00:00
} ,
{
"captures" : {
2018-10-04 10:00:39 +00:00
"0" : {
"name" : "variable.other.readwrite.powershell"
} ,
2018-02-27 10:57:41 +00:00
"1" : {
2018-10-04 10:00:39 +00:00
"name" : "punctuation.definition.variable.powershell"
2018-02-09 09:55:16 +00:00
} ,
2018-02-27 10:57:41 +00:00
"2" : {
"name" : "support.variable.drive.powershell"
} ,
"4" : {
2018-10-04 10:00:39 +00:00
"name" : "variable.other.member.powershell"
2018-02-09 09:55:16 +00:00
}
} ,
2018-05-14 12:14:19 +00:00
"match" : "(?i:(\\$|@)((?:\\p{L}|\\d|_)+:)?((?:\\p{L}|\\d|_)+))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?"
2018-02-09 09:55:16 +00:00
} ,
{
"captures" : {
2018-10-04 10:00:39 +00:00
"0" : {
"name" : "variable.other.readwrite.powershell"
} ,
2018-02-09 09:55:16 +00:00
"1" : {
2018-10-04 10:00:39 +00:00
"name" : "punctuation.definition.variable.powershell"
2018-02-09 09:55:16 +00:00
} ,
"2" : {
2018-05-23 12:03:55 +00:00
"name" : "punctuation.section.braces.begin.powershell"
2018-02-27 10:57:41 +00:00
} ,
"3" : {
2018-05-23 12:03:55 +00:00
"name" : "support.variable.drive.powershell"
2018-02-27 10:57:41 +00:00
} ,
"5" : {
2018-05-23 12:03:55 +00:00
"name" : "punctuation.section.braces.end.powershell"
} ,
"6" : {
2018-10-04 10:00:39 +00:00
"name" : "variable.other.member.powershell"
2018-02-09 09:55:16 +00:00
}
} ,
2018-05-23 12:03:55 +00:00
"match" : "(?i:(\\$)(\\{)((?:\\p{L}|\\d|_)+:)?([^}]*[^}`])(\\}))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?"
2018-02-09 09:55:16 +00:00
}
]
} ,
2018-05-14 12:14:19 +00:00
"UsingDirective" : {
"match" : "(?<!\\w)(?i:(using))\\s+(?i:(namespace|module))\\s+(?i:((?:\\w+(?:\\.)?)+))" ,
"captures" : {
"1" : {
"name" : "keyword.control.using.powershell"
} ,
"2" : {
"name" : "keyword.other.powershell"
} ,
"3" : {
"name" : "variable.parameter.powershell"
}
}
} ,
"RequiresDirective" : {
"begin" : "(?<=#)(?i:(requires))\\s" ,
"beginCaptures" : {
"0" : {
"name" : "keyword.control.requires.powershell"
}
} ,
"end" : "$" ,
"name" : "meta.requires.powershell" ,
"patterns" : [
{
2021-03-29 13:10:29 +00:00
"match" : "\\-(?i:Modules|PSSnapin|RunAsAdministrator|ShellId|Version|Assembly|PSEdition)" ,
2018-05-14 12:14:19 +00:00
"name" : "keyword.other.powershell"
} ,
{
"match" : "(?<!-)\\b\\p{L}+|\\d+(?:\\.\\d+)*" ,
"name" : "variable.parameter.powershell"
} ,
{
"include" : "#hashtable"
}
]
} ,
2018-02-27 10:57:41 +00:00
"variableNoProperty" : {
2018-02-09 09:55:16 +00:00
"patterns" : [
{
2018-02-27 10:57:41 +00:00
"captures" : {
2018-10-04 10:00:39 +00:00
"0" : {
2018-08-15 16:38:23 +00:00
"name" : "constant.language.powershell"
2018-10-04 10:00:39 +00:00
} ,
"1" : {
"name" : "punctuation.definition.variable.powershell"
2018-02-27 10:57:41 +00:00
}
} ,
"comment" : "These are special constants." ,
"match" : "(\\$)(?i:(False|Null|True))\\b"
2018-02-09 09:55:16 +00:00
} ,
{
"captures" : {
2018-10-04 10:00:39 +00:00
"0" : {
2018-08-15 16:38:23 +00:00
"name" : "support.constant.variable.powershell"
2018-07-09 09:57:24 +00:00
} ,
2018-10-04 10:00:39 +00:00
"1" : {
"name" : "punctuation.definition.variable.powershell"
} ,
2018-02-27 10:57:41 +00:00
"3" : {
2018-10-04 10:00:39 +00:00
"name" : "variable.other.member.powershell"
2018-02-27 10:57:41 +00:00
}
} ,
"comment" : "These are the other built-in constants." ,
"match" : "(\\$)(?i:(Error|ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID))\\b"
} ,
{
"captures" : {
2018-10-04 10:00:39 +00:00
"0" : {
2018-08-15 16:38:23 +00:00
"name" : "support.variable.automatic.powershell"
2018-07-09 09:57:24 +00:00
} ,
2018-10-04 10:00:39 +00:00
"1" : {
"name" : "punctuation.definition.variable.powershell"
} ,
2018-02-27 10:57:41 +00:00
"3" : {
2018-10-04 10:00:39 +00:00
"name" : "variable.other.member.powershell"
2018-02-27 10:57:41 +00:00
}
} ,
"comment" : "Automatic variables are not constants, but they are read-only..." ,
2019-05-16 17:17:43 +00:00
"match" : "(\\$)((?:[$^?])|(?i:_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This)\\b)"
2018-02-27 10:57:41 +00:00
} ,
{
"captures" : {
2018-10-04 10:00:39 +00:00
"0" : {
2018-08-15 16:38:23 +00:00
"name" : "variable.language.powershell"
2018-07-09 09:57:24 +00:00
} ,
2018-10-04 10:00:39 +00:00
"1" : {
"name" : "punctuation.definition.variable.powershell"
} ,
2018-02-27 10:57:41 +00:00
"3" : {
2018-10-04 10:00:39 +00:00
"name" : "variable.other.member.powershell"
2018-02-09 09:55:16 +00:00
}
} ,
2018-02-27 10:57:41 +00:00
"comment" : "Style preference variables as language variables so that they stand out." ,
2019-08-05 10:44:23 +00:00
"match" : "(\\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|InformationPreference|LogCommandHealthEvent|LogCommandLifecycleEvent|LogEngineHealthEvent|LogEngineLifecycleEvent|LogProviderHealthEvent|LogProviderLifecycleEvent|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|PSCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoLoadingPreference|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|ProgressPreference|VerbosePreference|WarningPreference|WhatIfPreference))\\b"
2018-02-09 09:55:16 +00:00
} ,
{
"captures" : {
2018-10-04 10:00:39 +00:00
"0" : {
"name" : "variable.other.readwrite.powershell"
} ,
2018-02-09 09:55:16 +00:00
"1" : {
2018-10-04 10:00:39 +00:00
"name" : "punctuation.definition.variable.powershell"
2018-02-09 09:55:16 +00:00
} ,
"2" : {
"name" : "storage.modifier.scope.powershell"
} ,
"4" : {
2018-10-04 10:00:39 +00:00
"name" : "variable.other.member.powershell"
2018-02-09 09:55:16 +00:00
}
} ,
2019-05-16 17:17:43 +00:00
"match" : "(?i:(\\$)(global|local|private|script|using|workflow):((?:\\p{L}|\\d|_)+))"
2018-02-09 09:55:16 +00:00
} ,
{
"captures" : {
2018-10-04 10:00:39 +00:00
"0" : {
"name" : "variable.other.readwrite.powershell"
} ,
2018-02-09 09:55:16 +00:00
"1" : {
2018-10-04 10:00:39 +00:00
"name" : "punctuation.definition.variable.powershell"
2018-02-09 09:55:16 +00:00
} ,
"2" : {
2018-02-27 10:57:41 +00:00
"name" : "storage.modifier.scope.powershell"
2018-02-09 09:55:16 +00:00
} ,
"4" : {
2018-02-27 10:57:41 +00:00
"name" : "keyword.other.powershell"
2018-02-09 09:55:16 +00:00
} ,
"5" : {
2018-10-04 10:00:39 +00:00
"name" : "variable.other.member.powershell"
2018-02-27 10:57:41 +00:00
}
} ,
2018-05-23 12:03:55 +00:00
"match" : "(?i:(\\$)(\\{)(global|local|private|script|using|workflow):([^}]*[^}`])(\\}))"
2018-02-27 10:57:41 +00:00
} ,
{
"captures" : {
2018-10-04 10:00:39 +00:00
"0" : {
"name" : "variable.other.readwrite.powershell"
} ,
2018-02-27 10:57:41 +00:00
"1" : {
2018-10-04 10:00:39 +00:00
"name" : "punctuation.definition.variable.powershell"
2018-02-27 10:57:41 +00:00
} ,
"2" : {
"name" : "support.variable.drive.powershell"
} ,
"4" : {
2018-10-04 10:00:39 +00:00
"name" : "variable.other.member.powershell"
2018-02-09 09:55:16 +00:00
}
} ,
2018-02-27 10:57:41 +00:00
"match" : "(?i:(\\$)((?:\\p{L}|\\d|_)+:)?((?:\\p{L}|\\d|_)+))"
2018-02-09 09:55:16 +00:00
} ,
{
"captures" : {
2018-10-04 10:00:39 +00:00
"0" : {
"name" : "variable.other.readwrite.powershell"
} ,
2018-02-09 09:55:16 +00:00
"1" : {
2018-10-04 10:00:39 +00:00
"name" : "punctuation.definition.variable.powershell"
2018-02-09 09:55:16 +00:00
} ,
"2" : {
2018-05-23 12:03:55 +00:00
"name" : "punctuation.section.braces.begin"
2018-02-27 10:57:41 +00:00
} ,
"3" : {
2018-05-23 12:03:55 +00:00
"name" : "support.variable.drive.powershell"
2018-02-27 10:57:41 +00:00
} ,
"5" : {
2018-05-23 12:03:55 +00:00
"name" : "punctuation.section.braces.end"
2018-02-09 09:55:16 +00:00
}
} ,
2018-05-23 12:03:55 +00:00
"match" : "(?i:(\\$)(\\{)((?:\\p{L}|\\d|_)+:)?([^}]*[^}`])(\\}))"
2018-02-09 09:55:16 +00:00
}
]
2018-05-14 12:14:19 +00:00
} ,
"hashtable" : {
2018-05-23 12:03:55 +00:00
"begin" : "(@)(\\{)" ,
2018-05-14 12:14:19 +00:00
"beginCaptures" : {
"1" : {
2018-05-23 12:03:55 +00:00
"name" : "keyword.other.hashtable.begin.powershell"
} ,
"2" : {
"name" : "punctuation.section.braces.begin.powershell"
2018-05-14 12:14:19 +00:00
}
} ,
"end" : "(\\})" ,
"endCaptures" : {
"1" : {
2018-05-23 12:03:55 +00:00
"name" : "punctuation.section.braces.end.powershell"
2018-05-14 12:14:19 +00:00
}
} ,
"name" : "meta.hashtable.powershell" ,
"patterns" : [
{
"captures" : {
"1" : {
2018-05-23 12:03:55 +00:00
"name" : "punctuation.definition.string.begin.powershell"
2018-05-14 12:14:19 +00:00
} ,
"2" : {
"name" : "variable.other.readwrite.powershell"
} ,
"3" : {
2018-05-23 12:03:55 +00:00
"name" : "punctuation.definition.string.end.powershell"
2018-05-14 12:14:19 +00:00
} ,
"4" : {
"name" : "keyword.operator.assignment.powershell"
}
} ,
"match" : "\\b((?:\\'|\\\")?)(\\w+)((?:\\'|\\\")?)(?:\\s+)?(=)(?:\\s+)?" ,
"name" : "meta.hashtable.assignment.powershell"
} ,
{
"include" : "#scriptblock"
} ,
{
"include" : "$self"
}
]
2018-05-23 12:03:55 +00:00
} ,
"doubleQuotedString" : {
2021-03-29 13:10:29 +00:00
"begin" : "[\"\\x{201C}-\\x{201E}]" ,
2018-10-04 10:00:39 +00:00
"beginCaptures" : {
"0" : {
"name" : "punctuation.definition.string.begin.powershell"
}
} ,
2021-03-29 13:10:29 +00:00
"end" : "[\"\\x{201C}-\\x{201E}]" ,
"applyEndPatternLast" : true ,
2018-10-04 10:00:39 +00:00
"endCaptures" : {
"0" : {
"name" : "punctuation.definition.string.end.powershell"
}
} ,
2018-05-23 12:03:55 +00:00
"name" : "string.quoted.double.powershell" ,
"patterns" : [
{
"match" : "(?i)\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,64}\\b"
} ,
{
"include" : "#variableNoProperty"
} ,
{
"include" : "#doubleQuotedStringEscapes"
} ,
2021-03-29 13:10:29 +00:00
{
"match" : "[\"\\x{201C}-\\x{201E}]{2}" ,
"name" : "constant.character.escape.powershell"
} ,
2018-05-23 12:03:55 +00:00
{
"include" : "#interpolation"
} ,
{
"match" : "`\\s*$" ,
"name" : "keyword.other.powershell"
}
]
2018-02-09 09:55:16 +00:00
}
2018-02-12 15:54:35 +00:00
}
2018-02-09 09:55:16 +00:00
}