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

Argument mode vs Expression mode #151

Open
msftrncs opened this issue Dec 16, 2018 · 1 comment
Open

Argument mode vs Expression mode #151

msftrncs opened this issue Dec 16, 2018 · 1 comment

Comments

@msftrncs
Copy link
Contributor

msftrncs commented Dec 16, 2018

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.

@msftrncs
Copy link
Contributor Author

Noting PR #156 demonstrates this topic.

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

1 participant