Updated docs
This commit is contained in:
@@ -763,6 +763,7 @@ static unsigned int writeInstructionForThen(Toy_Bytecode** mb, Toy_AstForThen as
|
||||
|
||||
emitString(mb, ast.condBranch->iterable.left->varDeclare.name);
|
||||
|
||||
//TODO: use a different approach
|
||||
//BUGFIX: shadow the iterable's name
|
||||
EMIT_BYTE(mb, code, TOY_OPCODE_READ);
|
||||
EMIT_BYTE(mb, code, TOY_VALUE_NULL);
|
||||
|
||||
+1
-1
@@ -482,7 +482,6 @@ static void processEliminate(Toy_VM* vm) {
|
||||
}
|
||||
|
||||
static void processIterate(Toy_VM* vm) {
|
||||
//URGENT: finish this
|
||||
//ITERATE on [-2] based on type, with [-1] as counter
|
||||
//then delegate to processJump
|
||||
|
||||
@@ -545,6 +544,7 @@ static void processIterate(Toy_VM* vm) {
|
||||
processJump(vm);
|
||||
}
|
||||
}
|
||||
//TODO: support closures as a parameter
|
||||
else {
|
||||
fprintf(stderr, TOY_CC_ERROR "ERROR: Unknown iterable type '%s' found in for loop, exiting\n" TOY_CC_RESET, Toy_getValueTypeAsCString(Toy_unwrapValue(compound).type));
|
||||
exit(-1);
|
||||
|
||||
Reference in New Issue
Block a user