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:
@@ -663,8 +663,8 @@ int test_scope(Toy_Bucket** bucketHandle) {
|
||||
|
||||
vm.scope == NULL ||
|
||||
Toy_isDeclaredScope(vm.scope, key) == false ||
|
||||
TOY_VALUE_IS_INTEGER(Toy_accessScope(vm.scope, key)) != true ||
|
||||
TOY_VALUE_AS_INTEGER(Toy_accessScope(vm.scope, key)) != 42
|
||||
TOY_VALUE_IS_INTEGER(*Toy_accessScopeAsPointer(vm.scope, key)) != true ||
|
||||
TOY_VALUE_AS_INTEGER(*Toy_accessScopeAsPointer(vm.scope, key)) != 42
|
||||
|
||||
)
|
||||
{
|
||||
@@ -712,7 +712,7 @@ int test_scope(Toy_Bucket** bucketHandle) {
|
||||
|
||||
vm.scope == NULL ||
|
||||
Toy_isDeclaredScope(vm.scope, key) == false ||
|
||||
TOY_VALUE_IS_NULL(Toy_accessScope(vm.scope, key)) != true
|
||||
TOY_VALUE_IS_NULL(*Toy_accessScopeAsPointer(vm.scope, key)) != true
|
||||
)
|
||||
{
|
||||
fprintf(stderr, TOY_CC_ERROR "ERROR: Unexpected result in 'Toy_VM' when testing scope, source: %s\n" TOY_CC_RESET, source);
|
||||
|
||||
Reference in New Issue
Block a user