Skip to content

fix: allow standalone heredoc in redirected_statement#332

Open
paulirish wants to merge 1 commit into
tree-sitter:masterfrom
paulirish:fix-standalone-heredoc
Open

fix: allow standalone heredoc in redirected_statement#332
paulirish wants to merge 1 commit into
tree-sitter:masterfrom
paulirish:fix-standalone-heredoc

Conversation

@paulirish
Copy link
Copy Markdown

bash allows commands that consist only of redirections. currently, the grammar handles standalone file redirects and herestrings, but standalone heredocs fail because they are only allowed when a command body is present.

this adds heredoc_redirect to the choice for standalone redirects in redirected_statement.

added tests for standalone heredocs and combinations with other redirects.

fixes #305

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

Successfully merging this pull request may close these issues.

Unable to parse heredoc at the beginning of the line

1 participant