forked from solstice/solstice
Fix struct interaction with type system
This commit is contained in:
@@ -1025,6 +1025,9 @@ ResultType(GroundProgram, charptr) generateStructNode(SolsNode* node, SolsScope*
|
|||||||
}
|
}
|
||||||
groundAddInstructionToProgram(&structDef, groundCreateInstruction(ENDSTRUCT));
|
groundAddInstructionToProgram(&structDef, groundCreateInstruction(ENDSTRUCT));
|
||||||
|
|
||||||
|
// Add to scope
|
||||||
|
addVariableToScope(scope, node->as.idName, type);
|
||||||
|
|
||||||
// Combine into one program
|
// Combine into one program
|
||||||
for (size_t i = 0; i < structDef.size; i++) {
|
for (size_t i = 0; i < structDef.size; i++) {
|
||||||
groundAddInstructionToProgram(&constants, structDef.instructions[i]);
|
groundAddInstructionToProgram(&constants, structDef.instructions[i]);
|
||||||
|
|||||||
Reference in New Issue
Block a user