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

parse fail with here document with variable #136

Closed
ARCowie28 opened this issue Jun 6, 2019 · 3 comments
Closed

parse fail with here document with variable #136

ARCowie28 opened this issue Jun 6, 2019 · 3 comments
Labels
grammar bug Issues related to the bash grammar

Comments

@ARCowie28
Copy link

Parse fails for entire document when you have a here document inside an if, that contains a variable as the first expression.

MWE:

if true; then
  a_string='some stuff to cat'
  cat <<XXX
${a_string}
XXX
fi

Issue does not occur if:

  • not inside an if
  • there is anything except newlines before ${a_string}, including whitespace
@skovhus
Copy link
Collaborator

skovhus commented Jun 6, 2019

Can you create an issue on the treesitter-bash repository? This is a problem with the grammar it seems.

@skovhus
Copy link
Collaborator

skovhus commented Sep 23, 2019

@skovhus
Copy link
Collaborator

skovhus commented Nov 25, 2022

This seems to have been fixed in the newer version of the grammar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grammar bug Issues related to the bash grammar
Projects
None yet
Development

No branches or pull requests

2 participants