Fixed some error states and error messages, read more

By leaving 'null' on the stack, it won't cause stack underflows in a
bunch of erroneous situations. This will allow the repl (and other
situations) to continue if they want to.

I've also fixed some error messages in toy_table.c, which were formatted
badly.

Closes #162
This commit is contained in:
2024-12-26 14:29:25 +11:00
parent 3ca816439e
commit 24cfe7f539
4 changed files with 26 additions and 9 deletions

View File

@@ -45,7 +45,6 @@ typedef enum Toy_OpcodeType {
TOY_OPCODE_PRINT,
TOY_OPCODE_CONCAT,
TOY_OPCODE_INDEX,
//URGENT: clear the program stack - much needed
//meta instructions
TOY_OPCODE_PASS,