-
Notifications
You must be signed in to change notification settings - Fork 56
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
Incorrect precedence in conditional_access_expression #172
Comments
Test case:
|
I thought conditional access expressions should be right-associative because:
However, whether it is left or right associative may not make much of a functional difference. I can't think of a situation where using left-associativity would give another result to an expression. So this may not really be a big problem. |
I think the problems with conditional access are related to this issue: Adding a rule changes associativity from right to left · Issue #1301 · tree-sitter/tree-sitter Conditional access expressions conflict with the conditional ternary operator.
If the parser sees |
@maxbrunsfeld have you got any ideas how we could tackle this one? |
I think it can't know with just one lookahead token. In |
Just wondering if there happen to be any updates as I am running into this issue currently in my work |
Actual:
Expected:
The text was updated successfully, but these errors were encountered: