mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Functions are successfully called, read more
Return keyword is not yet implemented. Functions are untested. See #163
This commit is contained in:
@@ -139,14 +139,6 @@ void Toy_declareScope(Toy_Scope* scope, Toy_String* key, Toy_Value value) {
|
||||
return;
|
||||
}
|
||||
|
||||
//constness check
|
||||
if (Toy_getNameStringVarConstant(key) && value.type == TOY_VALUE_NULL) {
|
||||
char buffer[key->info.length + 256];
|
||||
sprintf(buffer, "Can't declare %s as const with value 'null'", key->name.data);
|
||||
Toy_error(buffer);
|
||||
return;
|
||||
}
|
||||
|
||||
Toy_insertTable(&scope->table, TOY_VALUE_FROM_STRING(Toy_copyString(key)), value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user