Currently expressions like this: value += 2 are parsed as AssignmentStatements. This is strange because the AST ends up with 2 different pointers to the value token (in the assignment AND in the value += value). The TypeScript AST represents this as an ExpressionStatement, which seems to make more sense in this context, so we should consider moving to a similar pattern.
Currently expressions like this:
value += 2
are parsed asAssignmentStatements
. This is strange because the AST ends up with 2 different pointers to thevalue
token (in the assignment AND in thevalue += value
). The TypeScript AST represents this as anExpressionStatement
, which seems to make more sense in this context, so we should consider moving to a similar pattern.This would be a breaking change.