-
Notifications
You must be signed in to change notification settings - Fork 64
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
0.13.2 missing parsing errors #27
Comments
Parsing this file with 0.13.2, I get this output:
The last child of the In |
No, we were actually just checking if the tree sitter returned the ERROR type. Didn’t know the grammar supported error recovery. Really cool. I guess we could use that in bash-language-server to show hints. |
Another thing that might be useful is that you can check whether a parent node contains any errors of any kind using the |
Thanks! This is really useful. I've created an issue to look into this bash-lsp/bash-language-server#74 |
Great! I'm going to close this out since I think the parser is behaving correctly in this regard. |
Problem: When we have a missing token, tree-sitter won't report an ERROR node but instead will create an empty node. Solution: We check if such node exists, and if so, rename it so it's an ERROR node. Note tree-sitter has some functions to report whether an error exists, but it seems the Haskell version doesn't really bridge such function. Please see: tree-sitter/tree-sitter-bash#27 (comment)
0.13.1 error on a file like this with a missing
fi
:I guess this is a regression from 0.13.1? Didn't investigate if this is due to 6ff7fe3
The text was updated successfully, but these errors were encountered: