Skip to content

Add -any/-all operator syntax - #189

Closed
Mathias R. Jessen (IISResetMe) wants to merge 2 commits into
PowerShell:masterfrom
IISResetMe:update/any-all-lambda
Closed

Mathias R. Jessen (IISResetMe) wants to merge 2 commits into
PowerShell:masterfrom
IISResetMe:update/any-all-lambda

Conversation

@IISResetMe

Copy link
Copy Markdown
Contributor

To reflect changes to binary comparison operators in PowerShell/PowerShell#11068

@msftrncs

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor Author

Carl Morris (@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

Copy link
Copy Markdown
Contributor

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

Mathias R. Jessen (@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

Copy link
Copy Markdown
Contributor Author

Let's update the existing tests first

@TylerLeonhardt

Copy link
Copy Markdown
Member

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

To reflect changes to binary comparison operators in PowerShell/PowerShell#11068
Comment thread PowerShellSyntax.tmLanguage Outdated
Move `any|all` out of `[ic]` prefix group

Co-Authored-By: Carl Morris <msftrncs@midlands.net>
@IISResetMe

Copy link
Copy Markdown
Contributor Author

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

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.

3 participants