Definition: toy_literal_dictionary.h:31
Definition: toy_literal.h:85
Definition: toy_scope.h:21
struct Toy_Scope * ancestor
Definition: toy_scope.h:24
Toy_LiteralDictionary variables
Definition: toy_scope.h:22
int references
Definition: toy_scope.h:25
Toy_LiteralDictionary types
Definition: toy_scope.h:23
TOY_API bool Toy_declareScopeVariable(Toy_Scope *scope, Toy_Literal key, Toy_Literal type)
Declares a new variable key within scope, giving it the type of type. This function returns true on s...
TOY_API bool Toy_setScopeVariable(Toy_Scope *scope, Toy_Literal key, Toy_Literal value, bool constCheck)
Sets an existing variable named key to the value of value. This function fails if constCheck is true ...
TOY_API Toy_Scope * Toy_pushScope(Toy_Scope *scope)
Creates a new Toy_scope with scope as it's ancestor, and returns it.
TOY_API bool Toy_isDelcaredScopeVariable(Toy_Scope *scope, Toy_Literal key)
Checks to see if a given variable with the name key has been previously declared.
TOY_API Toy_Literal Toy_getScopeType(Toy_Scope *scope, Toy_Literal key)
Returns a new Toy_Literal representing the type of the variable named key.
TOY_API Toy_Scope * Toy_popScope(Toy_Scope *scope)
Frees the given scope, and returns it's ancestor.
TOY_API Toy_Scope * Toy_copyScope(Toy_Scope *original)
Copies an existing scope, and returns the copy.
TOY_API bool Toy_getScopeVariable(Toy_Scope *scope, Toy_Literal key, Toy_Literal *value)
Sets the literal pointed to by value to equal the variable named key. Returns true on success,...