Skip to content

Fix function highligting #137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 23, 2015
Merged

Fix function highligting #137

merged 4 commits into from
Nov 23, 2015

Conversation

Jaykul
Copy link
Contributor

@Jaykul Jaykul commented Nov 21, 2015

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 }

Not sure how to assert against these
Stop highlighting the keyword in the middle of other syntax
Scoped functions are highlighted wrong.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants