SublimeText / PowerShell

Support for the MS PowerShell programming language.
MIT License
312 stars 80 forks source link

Fix function highligting #137

Closed Jaykul closed 8 years ago

Jaykul commented 8 years ago

This fixes a longstanding bug highlighting code like:

# This is ok
Test-Highlight -Something StringValue
# This is not
Test-Highlight -TestFunction StringValue
# and it breaks this:
Test-Highlight -Something StringValue

I also fixed scope on function names, like:

function Test-Thing { Get-Command $VariableName }
# the function name should be highlighted as above, and both "global"s should be the same...
function global:Test-Thing { Get-Command $global:VariableName }
Function LOCAL:Test-Thing { Get-Command $local:VariableName }
FUNCTION script:Test-Thing { Get-Command $script:VariableName }