Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ syntaxes/
grammars/
node_modules/
atom/
atom.zip
atom.zip
.vscode/
4 changes: 2 additions & 2 deletions PowerShellSyntax.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@
<key>comment</key>
<string>These are the other built-in constants.</string>
<key>match</key>
<string>(\$)(?i:(Error|ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID))((?:\.(?:\p{L}|\d|_)+)*\b)?\b</string>
<string>(\$)(?i:(ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID))((?:\.(?:\p{L}|\d|_)+)*\b)?\b</string>
</dict>
<dict>
<key>captures</key>
Expand All @@ -1047,7 +1047,7 @@
<key>comment</key>
<string>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.</string>
<key>match</key>
<string>(\$)((?:[$^?])|(?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)?</string>
<string>(\$)((?:[$^?])|(?i:_|Args|ConsoleFileName|Error|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)?</string>
</dict>
<dict>
<key>captures</key>
Expand Down
39 changes: 29 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 24 additions & 4 deletions spec/testfiles/syntax_test_TheBigTestFile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,34 @@ $args
# ^ support.variable.automatic.powershell
$error
# <- punctuation.definition.variable.powershell
# ^ support.constant.variable.powershell
$home
# <- punctuation.definition.variable.powershell
# ^ support.constant.variable.powershell
# ^ support.variable.automatic.powershell
$foreach
# <- punctuation.definition.variable.powershell
# ^ support.variable.automatic.powershell

# Automatic constants
$executioncontext
# <- punctuation.definition.variable.powershell
# ^ variable.other.constant.powershell
$host
# <- punctuation.definition.variable.powershell
# ^ variable.other.constant.powershell
$home
# <- punctuation.definition.variable.powershell
# ^ variable.other.constant.powershell
$pid
# <- punctuation.definition.variable.powershell
# ^ variable.other.constant.powershell
$pshome
# <- punctuation.definition.variable.powershell
# ^ variable.other.constant.powershell
$psversiontable
# <- punctuation.definition.variable.powershell
# ^ variable.other.constant.powershell
$shellid
# <- punctuation.definition.variable.powershell
# ^ variable.other.constant.powershell

# Normal variables
$variable
# <- punctuation.definition.variable.powershell
Expand Down
⌂ Proxy