You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parsing the following command results in spurious redirect contents, which I think suggests that the distinction between command and redirected_statement nodes might want to be re-evaluated.
I think the direct cause of this mis-parse is the repeat1(...) in the file_redirect rule, which causes it to consume more than just one word as the destination of a redirection. (This is around line 505 of grammar.js.)
The parse should really have more argument fields after the redirect, but given the existing structure those arguments would have to be directly under redirected_statement, not body. This is why I commented above about the distinction between redirected_statement and command.
The text was updated successfully, but these errors were encountered:
Not 100% sure, but I think I'd suggest dropping redirected_statement entirely, and then making command be defined as (something like) a sequence of repeat(redirect:redirect) name:literal repeat(argument:literal | redirect:redirect).
[This issue is split off from issue #232.]
Parsing the following command results in spurious
redirect
contents, which I think suggests that the distinction betweencommand
andredirected_statement
nodes might want to be re-evaluated.x y <x a b c
Parse tree:
I think the direct cause of this mis-parse is the
repeat1(...)
in thefile_redirect
rule, which causes it to consume more than just one word as thedestination
of a redirection. (This is around line 505 ofgrammar.js
.)The parse should really have more
argument
fields after theredirect
, but given the existing structure thoseargument
s would have to be directly underredirected_statement
, notbody
. This is why I commented above about the distinction betweenredirected_statement
andcommand
.The text was updated successfully, but these errors were encountered: