lang: ast: implement ast iteration
iteration is implementing without recursion, instead using type-specific callbacks to construct a queue of nodes to iterate through. ast priting is implemented using this functionality.
This commit is contained in:
@@ -17,6 +17,8 @@ struct ast_node_type {
|
||||
struct ivy_ast_node *, struct ivy_ast_node *);
|
||||
void (*n_print)(struct ivy_ast_node *);
|
||||
void (*n_init_state)(struct parser_state *);
|
||||
void (*n_collect_children)(struct ivy_ast_node *, struct ivy_ast_node_iterator *);
|
||||
|
||||
size_t n_state_size;
|
||||
size_t n_node_size;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user