Skip to content
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

Update syntax for && and || statement operators #187

Open
rjmholt opened this issue Oct 15, 2019 · 5 comments
Open

Update syntax for && and || statement operators #187

rjmholt opened this issue Oct 15, 2019 · 5 comments

Comments

@rjmholt
Copy link

rjmholt commented Oct 15, 2019

Issue Description

PS 7 adds the && and || pipeline chain operators. These will need implementing in the TM grammar.

Expected Behavior

Highlight && and || like & or ;, highlight pipelines between them as normal

Code Samples

Get-Command -Name 'mycommand' && & mycommand
@msftrncs
Copy link
Contributor

I thought they were already in the syntax, but I cannot find them at this time.

In #155 and #156, I have them in as 'invalid.reserved'.

@rjmholt
Copy link
Author

rjmholt commented Oct 15, 2019

In #155 and #156, I have them in as 'invalid.reserved'.

That's really useful, thanks!

@msftrncs
Copy link
Contributor

@rjmholt, can you link to a PR in PowerShell/PowerShell where this is being added?

Thanks

@msftrncs
Copy link
Contributor

I knew I had seen them in this repo, here they are:

<dict>
<key>match</key>
<string>\|{2}|&amp;{2}|;</string>
<key>name</key>
<string>punctuation.terminator.statement.powershell</string>
</dict>

@rjmholt
Copy link
Author

rjmholt commented Oct 18, 2019

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

No branches or pull requests

2 participants