mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
WIP: Implementing arrays into the script, read more
I had intended to solve the Advent of Code puzzles in Toy, but they don't work without arrays. I wasn't able to enable arrays in time, so I need to focus on doing things correctly. The most immediate tasks are marked with 'URGENT', and a lot of tests need writing.
This commit is contained in:
@@ -341,6 +341,8 @@ static void debugStackPrint(Toy_Stack* stack) {
|
||||
|
||||
printf("%s\t", Toy_private_getValueTypeAsCString(v.type));
|
||||
|
||||
v = Toy_unwrapValue(v);
|
||||
|
||||
switch(v.type) {
|
||||
case TOY_VALUE_NULL:
|
||||
printf("null");
|
||||
@@ -382,6 +384,7 @@ static void debugStackPrint(Toy_Stack* stack) {
|
||||
case TOY_VALUE_OPAQUE:
|
||||
case TOY_VALUE_TYPE:
|
||||
case TOY_VALUE_ANY:
|
||||
case TOY_VALUE_REFERENCE:
|
||||
case TOY_VALUE_UNKNOWN:
|
||||
printf("???");
|
||||
break;
|
||||
@@ -406,6 +409,9 @@ static void debugScopePrint(Toy_Scope* scope, int depth) {
|
||||
|
||||
printf("%s\t%s\t", Toy_private_getValueTypeAsCString(v.type), TOY_VALUE_AS_STRING(k)->as.name.data);
|
||||
|
||||
k = Toy_unwrapValue(k);
|
||||
v = Toy_unwrapValue(v);
|
||||
|
||||
switch(v.type) {
|
||||
case TOY_VALUE_NULL:
|
||||
printf("null");
|
||||
@@ -447,6 +453,7 @@ static void debugScopePrint(Toy_Scope* scope, int depth) {
|
||||
case TOY_VALUE_OPAQUE:
|
||||
case TOY_VALUE_TYPE:
|
||||
case TOY_VALUE_ANY:
|
||||
case TOY_VALUE_REFERENCE:
|
||||
case TOY_VALUE_UNKNOWN:
|
||||
printf("???");
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user