libmya 0.1.0
Library to parse Mya language.
|
Go to the source code of this file.
Functions | |
void | aststack_init (aststack_t *stack) |
Initializes the given stack. | |
void | aststack_close (aststack_t *stack) |
Closes the given stack. | |
ast_node_t * | aststack_push (aststack_t *stack, node_type_t type, token_t *token) |
Push a new value on the stack. | |
ast_node_t * | aststack_insert (aststack_t *stack, ast_node_t *source) |
Push a new value on the stack copying from source pointer. | |
error_code_t | aststack_pop (aststack_t *stack, ast_node_t *value) |
Pop a value from the stack. | |
bool | aststack_isempty (aststack_t *stack) |
Check if the given stack is empty. | |
void aststack_close | ( | aststack_t * | stack | ) |
Closes the given stack.
stack | The stack to be closed. |
Definition at line 20 of file aststack.c.
void aststack_init | ( | aststack_t * | stack | ) |
Initializes the given stack.
stack | The stack to be initialized. |
Definition at line 11 of file aststack.c.
ast_node_t * aststack_insert | ( | aststack_t * | stack, |
ast_node_t * | source ) |
Push a new value on the stack copying from source
pointer.
stack | The stack where tbe value will be pushed. |
source | The AST node content. |
Definition at line 37 of file aststack.c.
bool aststack_isempty | ( | aststack_t * | stack | ) |
Check if the given stack is empty.
stack | The stack to check. |
Definition at line 59 of file aststack.c.
error_code_t aststack_pop | ( | aststack_t * | stack, |
ast_node_t * | value ) |
Pop a value from the stack.
stack | The stack from where the value will be poped. |
value | Pointer for where the poped value will be saved. |
Definition at line 47 of file aststack.c.
ast_node_t * aststack_push | ( | aststack_t * | stack, |
node_type_t | type, | ||
token_t * | token ) |
Push a new value on the stack.
stack | The stack where tbe value will be pushed. |
type | The AST node type. |
token | The AST node token. |
Definition at line 27 of file aststack.c.