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

Parsing error of newline + pipe operator combination #182

Open
En3Tho opened this issue Jan 10, 2024 · 1 comment · May be fixed by #236 or #258
Open

Parsing error of newline + pipe operator combination #182

En3Tho opened this issue Jan 10, 2024 · 1 comment · May be fixed by #236 or #258
Labels
help wanted Extra attention is needed parser Issues related to PowerShell script parsing

Comments

@En3Tho
Copy link
Contributor

En3Tho commented Jan 10, 2024

Consider this example:

$q = 1,2,3 # or some multiline cli call
$q
| Where-Object { $_ -gt 1 }
| ForEach-Object { "I'm $_" }

VSCode has no problems parsing that but plugin is unable to do so. Is it hard to fix?

@ForNeVeR ForNeVeR added help wanted Extra attention is needed parser Issues related to PowerShell script parsing labels Jan 10, 2024
@ForNeVeR
Copy link
Collaborator

ForNeVeR commented Jan 10, 2024

It is somewhat hard to deal with parser-related issues, since there's no official PowerShell grammar published for the modern PowerShell (at least I hadn't been able to find it). And the ones that were published as part of the documentation are sometimes contradictory1.

I have a queue of parser-related issues I'd like to eventually deal with, but so far I did little progress (better than nothing, but still not much).

You can try taking a look, I guess.

Footnotes

  1. Not saying they are actually contradictory in relation to this particular issue; it's totally possible that this is just a plugin bug, and not a problem of the published grammar.

@En3Tho En3Tho linked a pull request Mar 13, 2024 that will close this issue
ForNeVeR added a commit that referenced this issue Mar 13, 2024
For #182, we want to distinguish a single newline versus several newlines in a PowerShell file.

This change allows that.
ForNeVeR added a commit that referenced this issue Mar 13, 2024
For #182, we want to distinguish a single newline versus several newlines in a PowerShell file.

This change allows that.
@ForNeVeR ForNeVeR linked a pull request Mar 25, 2024 that will close this issue
2 tasks
ForNeVeR added a commit that referenced this issue May 22, 2024
For #182, we want to distinguish a single newline versus several newlines in a PowerShell file.

This change allows that.
ForNeVeR added a commit that referenced this issue May 22, 2024
For #182, we want to distinguish a single newline versus several newlines in a PowerShell file.

This change allows that.
ForNeVeR added a commit that referenced this issue May 24, 2024
For #182, we want to distinguish a single newline versus several newlines in a PowerShell file.

This change allows that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed parser Issues related to PowerShell script parsing
Projects
None yet
2 participants