Bash expression with arithmetic operations causing syntax error in bash-language-server
eval-exec opened this issue · comments
Eval Exec commented
Code editor
Emacs
Platform
NixOS
Version
5.1.2
What steps will reproduce the bug?
Create a file test.sh
write content:
#!/usr/bin/env bash
a=4
b=6
num=$((($a + $b) / 2))
echo ${num}
Then bash-language-server will report:
(bash-language-server): 08:14:09.764 WARNING Error while parsing file:///tmp/bash/test.sh: syntax error
How often does it reproduce? Is there a required condition?
No, its can reproduce 100%.
What is the expected behavior?
no warning.
What do you see instead?
I see bash-language-server report an error:
(bash-language-server): 08:14:09.764 WARNING Error while parsing file:///tmp/bash/test.sh: syntax error
Additional information
No response
Kenneth Skovhus commented
This is related to the treesitter bash grammar, so unfortunately nothing we can do here.