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

@@ -39,8 +39,6 @@ typedef struct Toy_VM {
//easy access to memory
Toy_Bucket* stringBucket; //stores the string literals
Toy_Bucket* scopeBucket; //stores the scopes
//URGENT: panic/failed state flag
} Toy_VM;
TOY_API void Toy_initVM(Toy_VM* vm);