-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
fix(grainfmt): Remove extraneous parens around infix function application #902
Conversation
Co-authored-by: Oscar Spencer <oscar@grain-lang.org>
I have much better confidence in this version as I'm using operator precedence and making the comparison in the right place. Quite a few tests too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent! I really love how we write formatter tests.
Fixes #859
The formatter was cautiously adding parens around too many infix function application parameters.
This has been fixed. The formatter still adds some redundant parens, e.g.
3 + (4 * 5) can be simplified to 3 + 4 * 5
which I will fix in another PR where we take operator precedence into account