-
Notifications
You must be signed in to change notification settings - Fork 62
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
Parsing Broken: Remove smallest pattern with nested expansion is broken #254
Comments
@amaanq I'm not familiar with this codebase. If I were to try to start looking for the source of this issue, where would I start? It makes files that contain this syntax unusable. |
@amaanq would you say that this is a duplicate of #214?
This sounds like a similar class of problem. I'm happy to close if you'd rather. I've just silenced shellcheck on this line in the codebase I discovered this in to use the syntax that treesitter understands. That said, shellcheck actually recommends this syntax, so more reports of this type of issue might crop up. |
The grammar doesn't appear to handle quoted expansion inside of
${}
when removing the smallest suffix pattern via%
.This is broken:
"${1%"$2"*}"
, this is not:"${1%$2*}"
. The broken behavior only appears when followed by a double quoted string.I've tried to reduce the issue as much as possible to ease debugging. The following demonstrates the issue:
Note: not quoting the expansion within
"${}"
is warned about by shellcheck SC2295, which is how I discovered this issue.Using treesitter with neovim:
The text was updated successfully, but these errors were encountered: