forked from solstice/solstice
Don't evaluate left of '='
This commit is contained in:
@@ -1360,6 +1360,9 @@ ResultType(GroundProgram, charptr) generateCode(SolsNode* node, SolsScope* scope
|
||||
}
|
||||
// Generate code for all children before generating this node's code
|
||||
for (size_t i = 0; i < node->children.count; i++) {
|
||||
if (node->type == SNT_OP_SET && i == 0) {
|
||||
continue; // Don't evaluate the left of set, just the right
|
||||
}
|
||||
ResultType(GroundProgram, charptr) generated = generateCode(&node->children.at[i], scope);
|
||||
if (generated.error) {
|
||||
return Error(GroundProgram, charptr, createCodegenError(&node->children.at[i], generated.as.error));
|
||||
|
||||
Reference in New Issue
Block a user