bash-language-server
bash-language-server copied to clipboard
Failed to parse expression on negated test
I am not sure this is related to #135, as there is no assignment in my test:
if ! { test -d /tmp &&
test -d /home ; }; then
echo "Missing directories"
return 1
fi
echo "All is well, let's get started..."
This runs as expected on WSL Ubuntu18.04LTS, CentOS 6.10, ... (the directories both exist, so the negation gives a false and skips the body of "then").
However I get Failed to parse expression
from bash-language-server (as an extension in my VS Code).
Taking away the negation gets rid of the syntax error, but I don't see any issues with the original code that should lead to parse errors? I'm using a group based on: https://www.gnu.org/software/bash/manual/html_node/Command-Grouping.html
Thanks for reporting this issue. It seems to be a grammar issue.
Can you create an issue over here: https://github.com/tree-sitter/tree-sitter-bash
This seems to have been fixed in the newer version of the grammar