@???@
More...
#include <stdbool.h>
#include "toy_literal.h"
#include "toy_literal_array.h"
#include "toy_literal_dictionary.h"
Go to the source code of this file.
|
| 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 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_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 success, otherwise it returns failure (such as if the given key already exists).
|
| |
| 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 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 and the given key's type has the constaant flag set. It also fails if the given key doesn't exist. Returns true on success, otherwise it returns false.
|
| |
| 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, otherwise it returns false.
|
| |
| 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_Scope
◆ Toy_copyScope()
Copies an existing scope, and returns the copy.
- Parameters
-
- Returns
◆ Toy_declareScopeVariable()
Declares a new variable key within scope, giving it the type of type. This function returns true on success, otherwise it returns failure (such as if the given key already exists).
- Parameters
-
- Returns
◆ Toy_getScopeType()
Returns a new Toy_Literal representing the type of the variable named key.
- Parameters
-
- Returns
◆ Toy_getScopeVariable()
Sets the literal pointed to by value to equal the variable named key. Returns true on success, otherwise it returns false.
- Parameters
-
- Returns
◆ Toy_isDelcaredScopeVariable()
Checks to see if a given variable with the name key has been previously declared.
- Parameters
-
- Returns
◆ Toy_popScope()
Frees the given scope, and returns it's ancestor.
- Parameters
-
- Returns
◆ Toy_pushScope()
Creates a new Toy_scope with scope as it's ancestor, and returns it.
- Parameters
-
- Returns
◆ Toy_setScopeVariable()
Sets an existing variable named key to the value of value. This function fails if constCheck is true and the given key's type has the constaant flag set. It also fails if the given key doesn't exist. Returns true on success, otherwise it returns false.
- Parameters
-
| scope | |
| key | |
| value | |
| constCheck | |
- Returns