Added types and constness

Fixed #144
This commit is contained in:
2024-11-02 11:39:14 +11:00
parent 3ad53c5e0e
commit 7173f7770f
14 changed files with 266 additions and 44 deletions

View File

@@ -304,8 +304,8 @@ int test_scope_elements() {
Toy_Bucket* bucket = Toy_allocateBucket(TOY_BUCKET_IDEAL);
Toy_Scope* scope = Toy_pushScope(&bucket, NULL);
Toy_String* hello1 = Toy_createNameStringLength(&bucket, "hello", 5, TOY_VALUE_NULL);
Toy_String* hello2 = Toy_createNameStringLength(&bucket, "hello", 5, TOY_VALUE_NULL);
Toy_String* hello1 = Toy_createNameStringLength(&bucket, "hello", 5, TOY_VALUE_ANY, false);
Toy_String* hello2 = Toy_createNameStringLength(&bucket, "hello", 5, TOY_VALUE_ANY, false);
//check nothing is here
if (Toy_isDeclaredScope(scope, hello2)) {
@@ -389,7 +389,7 @@ int test_scope_elements() {
Toy_Bucket* bucket = Toy_allocateBucket(TOY_BUCKET_IDEAL);
Toy_Scope* scope = Toy_pushScope(&bucket, NULL);
Toy_String* hello = Toy_createNameStringLength(&bucket, "hello", 5, TOY_VALUE_NULL);
Toy_String* hello = Toy_createNameStringLength(&bucket, "hello", 5, TOY_VALUE_ANY, false);
//declare and push
Toy_declareScope(scope, hello, TOY_VALUE_FROM_INTEGER(42));