mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-19 16:54:08 +10:00
Some declaration guards
This commit is contained in:
@@ -59,7 +59,11 @@ bool declareScopeVariable(Scope* scope, Literal key, Literal type) {
|
||||
return true;
|
||||
}
|
||||
|
||||
//return false if undefined
|
||||
bool isDelcaredScopeVariable(Scope* scope, Literal key) {
|
||||
return existsLiteralDictionary(&scope->variables, key);
|
||||
}
|
||||
|
||||
//return false if undefined, or can't be assigned
|
||||
bool setScopeVariable(Scope* scope, Literal key, Literal value) {
|
||||
//dead end
|
||||
if (scope == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user