added while and do-while loops

This commit is contained in:
cozis
2021-11-03 01:25:18 +00:00
parent 035649bd63
commit c0d788656e
7 changed files with 328 additions and 7 deletions
+1
View File
@@ -62,6 +62,7 @@ static const InstrInfo instr_table[] = {
[OPCODE_RETURN] = {"RETURN", 0, NULL},
[OPCODE_JUMPIFNOTANDPOP] = {"JUMPIFNOTANDPOP", 1, (OperandType[]) {OPTP_INT}},
[OPCODE_JUMPIFANDPOP] = {"JUMPIFANDPOP", 1, (OperandType[]) {OPTP_INT}},
[OPCODE_JUMP] = {"JUMP", 1, (OperandType[]) {OPTP_INT}},
};
+1
View File
@@ -40,6 +40,7 @@ typedef enum {
OPCODE_PUSHNNE,
OPCODE_PUSHFUN,
OPCODE_RETURN,
OPCODE_JUMPIFANDPOP,
OPCODE_JUMPIFNOTANDPOP,
OPCODE_JUMP,
} Opcode;