Added CObj->proto support, state->protoObjects defines default protos for each COBJ type

a lot of refactoring in the VM
This commit is contained in:
2021-01-07 19:50:36 -06:00
parent c5bd0c2478
commit 1351ff63b1
9 changed files with 195 additions and 150 deletions

View File

@@ -1357,7 +1357,7 @@ static void forLoop(CParseState *pstate) {
startLoop(pstate);
int iteratorStart = getChunk(pstate)->count;
expression(pstate, 0, true);
expressionPrecedence(pstate, 0, PREC_ASSIGNMENT, true); // any expression (including assignment)
consume(pstate, TOKEN_RIGHT_PAREN, "Expected ')' after iterator");
writeJmpBack(pstate, loopStart);