-
Notifications
You must be signed in to change notification settings - Fork 93
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
Allow preserving parenthesis. #113
base: master
Are you sure you want to change the base?
Conversation
First of all, the test suite is failing. I will not be merging anything without that fixed. Second, this may conflict with #98 when it is finally merged. And finally, I am not necessarily sold on preserving parentheses where they are not semantically meaningful. This is an abstract syntax tree after all. |
Edit: the tests was due to a typo, just fixed it. |
Now CI is failing due to coverage, I have no idea what to do from here on but I hope you will consider the idea, it might be really useful for some. If not then there must atleast be some way to achieve this from the user side. |
This is very useful for when converting the tree back to source code to know where parenthesis have been used by the user.
This is inspired by acornjs and is exactly how they did it.
Example:
print((5 + 2) * 3)