-
Notifications
You must be signed in to change notification settings - Fork 84
Shell arithmetic syntax highlight breaks on multiple cases #148
Comments
Thanks again @leagris 👍 I can reproduce with on macOS 10.12.6 but not sure if this belongs in https://github.com/tree-sitter/tree-sitter-bash. For example, I see that the issue with I think that leaves 2 issues from your report, I don't think these have been reported? ((a=42)) # variable not highlighted and: a="$((~(-1 << 8)))" # parenthesis highlight broken I'll see which repo the other maintainers think the issue belongs. |
I was about to file a bug report for exactly this issue... if test 0 -ne $((bDebug & 2#0001)); then
....
fi Atom's highlighting/parsing bugs after the hash sign of |
@TriMoon if ((bDebug & 2#0001)); then
echo 'ok'
fi or: ((bDebug & 2#0001)) && echo 'ok' or: Oh! Well, it does not show the bug then! ((bDebug & 1)) && echo 'ok' |
@leagris is that first example you give using |
@TriMoon |
The base value can be a variable name, so checking for The correct fix is to turn-off comments parsing within an arithmetic expression, as there is no comment allowed within it. |
Prerequisites
Description
Shell arithmetic syntax highlighting breaks on multiple cases:
base#
is treated as a comment marker((
))
delimiters detection.Steps to Reproduce
Expected behavior:
Same correct highlighting as sample code above as shown in github
Actual behavior:
Reproduces how often:
100% reproducible
Versions
Versions
Additional Information
none
The text was updated successfully, but these errors were encountered: