tree-sitter-c
tree-sitter-c copied to clipboard
C precedence bugs
Using the following in the playground leads to an inaccurate parse:
int f(void) {
return a *= b != c ? d : e;
}
This parses as (a*=(b!=c))?d:e
, not a *= ((b!=c) ? d : e)
.
Proof: https://gcc.godbolt.org/z/dqYYnbcE4
Another misparse is a(b) >> c &= d
.
Reported thanks to atk