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

Failed to parse functions #133

Closed
heftig opened this issue May 30, 2019 · 3 comments
Closed

Failed to parse functions #133

heftig opened this issue May 30, 2019 · 3 comments
Labels
grammar bug Issues related to the bash grammar

Comments

@heftig
Copy link

heftig commented May 30, 2019

This fails to parse:

foo() (
  true
)

Note that a function's body can be any Compound Command, so it's also legal to write:

bar() [[ -e foo ]]
baz() if [[ $a = $b ]]; then
  echo 1
else
  echo 2
fi
@skovhus
Copy link
Collaborator

skovhus commented Sep 23, 2019

Thanks for reporting this issue. It seems to be a grammar issue.

I create an issue: tree-sitter/tree-sitter-bash#60

@skovhus skovhus added the grammar bug Issues related to the bash grammar label Sep 23, 2019
@Ben-Voris
Copy link

This was updated here ld pushed a commit that referenced this issue on May 15, 2020

@skovhus
Copy link
Collaborator

skovhus commented Apr 5, 2022

Yes, the fix was merged and release back in 2020. There still seems to be an issue with compound command – but this should be tracked at the tree-sitter-bash repository.

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

3 participants