lang: replace stack-based parser with a recursive parser
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#include "iterate.h"
|
||||
#include "node.h"
|
||||
|
||||
#include <fx/ds/string.h>
|
||||
|
||||
static void collect_children(
|
||||
struct ivy_ast_node *node, struct ivy_ast_node_iterator *iterator)
|
||||
{
|
||||
struct ivy_ast_do_node *do_node = (struct ivy_ast_do_node *)node;
|
||||
ast_node_iterator_enqueue_node(iterator, node, do_node->n_block);
|
||||
}
|
||||
|
||||
struct ast_node_type do_node_ops = {
|
||||
.n_collect_children = collect_children,
|
||||
.n_node_size = sizeof(struct ivy_ast_op_node),
|
||||
};
|
||||
Reference in New Issue
Block a user