Skip to content

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

Description

@rjmholt

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

Activity

  1. msftrncs commented on Oct 15, 2019

    @msftrncs
    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'.

  2. rjmholt commented on Oct 15, 2019

    @rjmholt
    Author

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

    That's really useful, thanks!

  3. msftrncs commented on Oct 16, 2019

    @msftrncs
    Contributor

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

    Thanks

  4. msftrncs commented on Oct 16, 2019

    @msftrncs
    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>

  5. rjmholt commented on Oct 18, 2019

    @rjmholt
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions