forked from brownplt/webbits
-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
Description
One idea after using this lib for a bit: How do you guys feel about changing the AST to get rid of the Infix/Assign/Pre/Postfix data types and inlining them directly into the expression data type? E.g. change
InfixExpr a InfixOp (Expression a) (Expression a) to
Add a (Expression a) (Expression a)
Sub a (Expression a) (Expression a)
...this would lead to simpler code (at least for my usage, and I believe also in the internal parser implementation), and if you do want to match on an e.g. infix operator we could provide view patterns...
I realize this probably would introduce major breakage in any existing clients, if anyone would be looking to upgrade es3 -> es5 (is this currently possible?)