void ast_node_init(ast_node_t *node, ast_node_t *parent, node_type_t type, token_t *token)
Initializes an AST node.
void ast_copy(ast_node_t *destiny, ast_node_t *source)
Copies the content of source to destinty AST nodes.
void ast_close(ast_node_t *root)
Closes the given AST root node and all children.
ast_node_t * ast_insert_children(ast_node_t *parent, ast_node_t *child)
Insert a exitent AST node as children of the given parent node.
void ast_to_json(ast_node_t *root, FILE *file)
Reads the AST and converts it to JSON, writting on the given file stream.
ast_node_t * ast_add_children(ast_node_t *parent, node_type_t type, token_t *token)
Add a new children for the given AST node.
enum node_type node_type_t
struct ast_node ast_node_t
struct token token_t
Struct for a Mya token.