Skip to content

Argument mode vs Expression mode #151

Open
@msftrncs

Description

@msftrncs

For reference: Powershell Docs: About Parsing

The current syntax does not take in to account PowerShell's parsing, argument mode vs expression mode.

Lacking this is causing scoping of some operators when they should not be treated as such, and failure to scope operators when they should be treated as such, or properly scoping parameter tags vs commands that start with a '-', ect...

This actually would be a pretty large undertaking. It would probably go along with #137

This would probably require a reorganization of all the matches in to the repository, with the base match limited to just scanning the first token using a BEGIN with a forward lookup to sort out whether to run in expression or argument mode, ENDing at anywhere a line continuation isn't permitted, or otherwise at the end of a command (pipe, ';', etc) and this would require than any scoping that allows line continuation must also use BEGIN type matches to keep the parsing moving. The '&' could be a bit tricky, as it can be both the start of a command and the end of a command.

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