PowerShell / EditorSyntax

PowerShell syntax highlighting for editors (VS Code, Atom, SublimeText, TextMate, etc.) and GitHub!
MIT License
133 stars 45 forks source link

Cmdlet parameter scopes #112

Open keith-hall opened 6 years ago

keith-hall commented 6 years ago

Environment

Issue Description

Cmdlet parameters are scoped as assignment operators...

Screenshots

image

Expected Behavior

The scope of the - should be punctuation.definition.parameter, and the scope of the parameter should be variable.parameter, this is currently unscoped.

Code Samples

Get-Service -Name test

Extra Notes

Also, test in the code snippet above should probably be scoped as string.unquoted

omniomi commented 6 years ago

This is related to #76

omniomi commented 6 years ago

Was thinking about this on the drive to work... I think I may have a way to define function invocation from start to finish in a way that we can grab even unapproved verbs and private functions without Verb-Noun without clobbering anything else. Will experiment with it later and hopefully we can nail a bunch of issues with one little string of regex ;D