From b2c539fadfa7ea3eea2e5f7c0c37b5f5f1370c5a Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Tue, 3 Jan 2023 09:45:40 -0800 Subject: actually evaluates and prints something now! --- src/ast.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/ast.c') diff --git a/src/ast.c b/src/ast.c index a2a7bb5..e1a8e6c 100644 --- a/src/ast.c +++ b/src/ast.c @@ -57,3 +57,10 @@ ast_t *init_ast_function(ast_t *car, ast_t *cdr) { a->cdr = cdr; return a; } + +ast_t *init_ast_root(ast_t **subnodes, int size) { + ast_t *a = init_ast(AST_ROOT); + a->subnodes = subnodes; + a->root_size = size; + return a; +} -- cgit