PowerShell / EditorSyntax

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

Add -any/-all operator syntax #189

Closed IISResetMe closed 3 years ago

IISResetMe commented 4 years ago

To reflect changes to binary comparison operators in https://github.com/PowerShell/PowerShell/pull/11068

msftrncs commented 4 years ago

A note, this adds 'keyword' highlighting, not syntax support. The current grammar file only handles keyword highlighting. This means that parameters of -any and -all will be highlighted as operators instead of as parameters, which is what happens for all the other operators as well.

IISResetMe commented 4 years ago

@msftrncs thanks for the clarification. The PowerShellSyntax.tmLanguage file was the only file I could find describing the operators, anywhere else I would need to update?

msftrncs commented 4 years ago

The PowerShellSyntax.tmLanguage file was the only file I could find describing the operators, anywhere else I would need to update?

@IISResetMe, there are other files that are used to demonstrate examples, and also a few to act as tests. It would be advisable to at least add tests, at least as a separate commit to this PR, that confirm the scoping of your new keywords. Reference https://github.com/PowerShell/EditorSyntax/blob/master/spec/testfiles/syntax_test_TheBigTestFile.ps1 for providing a test. Probably in the operators section.

IISResetMe commented 4 years ago

Let's update the existing tests first

TylerLeonhardt commented 4 years ago

Merged that one in. Feel free to update this with tests now.

IISResetMe commented 3 years ago

I've abandoned the underlying feature, this is no longer relevant