forked from ground/ground
Fix code skipping when using use
This commit is contained in:
@@ -1913,16 +1913,20 @@ GroundValue interpretGroundInstruction(GroundInstruction inst, GroundScope* scop
|
|||||||
GroundProgram program = parseFile(fileContents);
|
GroundProgram program = parseFile(fileContents);
|
||||||
free(fileContents);
|
free(fileContents);
|
||||||
|
|
||||||
GroundScope newScope = {
|
GroundScope newScope = {
|
||||||
.variables = scope->variables,
|
.variables = scope->variables,
|
||||||
.labels = malloc(sizeof(GroundLabel*)),
|
.labels = malloc(sizeof(GroundLabel*)),
|
||||||
.isMainScope = false
|
.isMainScope = false
|
||||||
};
|
};
|
||||||
|
|
||||||
*newScope.labels = NULL;
|
*newScope.labels = NULL;
|
||||||
|
|
||||||
|
int ci = currentInstruction;
|
||||||
|
|
||||||
interpretGroundProgram(&program, &newScope);
|
interpretGroundProgram(&program, &newScope);
|
||||||
|
|
||||||
|
currentInstruction = ci;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user