For loop on arrays working, untested, read more

Needed: break and continue support, extensive tests, other iterables
This commit is contained in:
2026-05-24 18:13:18 +10:00
parent 813da3e1aa
commit f11bc95833
10 changed files with 241 additions and 58 deletions
+2 -1
View File
@@ -12,9 +12,9 @@ typedef enum Toy_OpcodeType {
TOY_OPCODE_ACCESS,
TOY_OPCODE_INVOKE, //for calling functions
TOY_OPCODE_ATTRIBUTE, //for accessing parts of compounds
TOY_OPCODE_ITERABLE, //for operating on all members of a compound
TOY_OPCODE_DUPLICATE, //duplicate the top of the stack
TOY_OPCODE_ELIMINATE, //remove the top of the stack
TOY_OPCODE_ITERATE, //for operating on all members of a compound
//arithmetic instructions
TOY_OPCODE_ADD,
@@ -67,5 +67,6 @@ typedef enum Toy_OpParamJumpConditional {
TOY_OP_PARAM_JUMP_ALWAYS = 0,
TOY_OP_PARAM_JUMP_IF_TRUE = 1,
TOY_OP_PARAM_JUMP_IF_FALSE = 2,
TOY_OP_PARAM_JUMP_IF_NULL = 3,
} Toy_OpParamJumpConditional;