Open ravener opened 2 years ago
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.
@fstirlitz
1) not sure why tests failed, it wasn't really a major change, i'll take a look. 2) not sure what to say about this, i think this change is still compatible with it. 3) well as I said it helps when transforming the tree back to source code, it's hidden behind an option anyway.
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)