Why Preserving Parenthesis in AST?
Even though we don’t need parenthesis when evaluating an expression, they are useful to disambiguate in assignment when we have an lvalue/rvalue situation:
int x;
x = 1; // valid
(x) = 42; // invalid
Even though we don’t need parenthesis when evaluating an expression, they are useful to disambiguate in assignment when we have an lvalue/rvalue situation:
int x;
x = 1; // valid
(x) = 42; // invalid