Skip to content
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

Coalesce operator missing parentheses after ast print #442

Closed
Projoker opened this issue Sep 21, 2023 · 2 comments
Closed

Coalesce operator missing parentheses after ast print #442

Projoker opened this issue Sep 21, 2023 · 2 comments
Labels

Comments

@Projoker
Copy link

Tried

  1. parse (nil ?? 1) > 0 to ast
  2. print ast as string

Expected
(nil ?? 1) > 0

Got
nil ?? 1 > 0, which is invalid expression coz Operator (>) and coalesce expressions (??) cannot be mixed. Wrap either by parentheses

@Projoker
Copy link
Author

probably related to #434

@antonmedv
Copy link
Member

This can be fixed. =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants