-
-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Description
- Having specific nodes for parentheses doesn't make much sense for me. Parentheses are supposed to be a tip to parser, in AST we don't have any ambiguities where parentheses matter:
(1 + 2) + 3 BinaryExpression: left: BinaryExpression: left: 1 right: 2 right: 31 + (2 + 3) BinaryExpression: left: 1 right: BinaryExpression: left: 2 right: 3 - It would make code cleaner and easier to maintain, since to fix issues like Fix for property access on string and array literals #650 we won't have to duplicate logic everywhere
- It would make code less bug-prone, since we'll have less invalid states in AST
- Most of JS parsers (babel, acorn, esprima) do it
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels