Closed yodalee closed 6 years ago
Fix CI failure and append test cases.
It is interesting that I cannot reproduce the error on my computer. I think I need more time to investigate it. The expression a += a += 10 is perfectly legal according to standard. Though it is stupid to write like that. I think we can ignore it. It is still possible to implement it by adding some new opcode I think.
Oh great. I update to upstream and I can reproduce the error now.
@yodalee, why would you like to introduce new opcodes? And, how do the proposed opcode look like?
Update to solve the regression fail. The reason is actually stupid: amacc currently require variable declaration appears before statement.
The reason is actually stupid: amacc currently require variable declaration appears before statement.
Issue #36 aims to resolve such known restriction.
@yodalee, Please append new test cases as well.
Update some tiny test to compound assign.
About the new opcode to solve the expression a += a += 10
. I think I need some time to consider about it.
Updated.
Thanks @jserv
Add support to compound assignment +=, -=, *=. However, single line with multiple compound assignment to same variable will not work in this implementation. like: a += a += 10;