This issue refers to the not yet implemented operations: i++, ++i, i += 1.
i++/++i
At parser level: The respective prefix/infix parselets check if the right/left expression is an property accessor, and replaces the expression with a AST that signals the operation.
At AST level: Specialized versions of PropertyAccessExpr/IdentifierExpr/SubscriptAccessExpr are created to handle this increment/decrement operations. Use prefix: Boolean, decrement: Boolean to hold the required values.
At compiler level: It is quite simple to implement all but the subscript one:
- Identifier is a simple
GetVariable(identifier), Increment; SetVariable(identifier) operation.
- PropertyAccess is a bit more complicated:
+parent, Dup. GetMember(target), Increment, SetMember(target).
- SubscriptAccess might require some scope quickmagic to work, since all subscript arguments should be called only once.
i += 1
At parser level: Handle it at the same place as the assign operations.
At AST level: Once again, specialized versions of PropertyAccessExpr/IdentifierExpr/SubscriptAccessExpr, but with an enum signifying which assign operations.
At compiler level: Same hassle as increment/decrement.
This issue refers to the not yet implemented operations:
i++,++i,i += 1.i++/++iAt parser level: The respective prefix/infix parselets check if the right/left expression is an property accessor, and replaces the expression with a AST that signals the operation.
At AST level: Specialized versions of
PropertyAccessExpr/IdentifierExpr/SubscriptAccessExprare created to handle this increment/decrement operations. Useprefix: Boolean, decrement: Booleanto hold the required values.At compiler level: It is quite simple to implement all but the subscript one:
GetVariable(identifier), Increment; SetVariable(identifier)operation.+parent, Dup. GetMember(target), Increment, SetMember(target).i += 1At parser level: Handle it at the same place as the assign operations.
At AST level: Once again, specialized versions of
PropertyAccessExpr/IdentifierExpr/SubscriptAccessExpr, but with an enum signifying which assign operations.At compiler level: Same hassle as increment/decrement.