lang: replace stack-based parser with a recursive parser

This commit is contained in:
2026-04-06 18:25:43 +01:00
parent 3a549aa6df
commit b904813cef
77 changed files with 2984 additions and 6499 deletions
+16
View File
@@ -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),
};