diff options
author | Preston Pan <preston@nullring.xyz> | 2023-01-03 09:45:40 -0800 |
---|---|---|
committer | Preston Pan <preston@nullring.xyz> | 2023-01-03 09:45:40 -0800 |
commit | b2c539fadfa7ea3eea2e5f7c0c37b5f5f1370c5a (patch) | |
tree | 0f4b9db8c6bf345c9011667c9fbb61393d93a347 /src/ast.c | |
parent | 9f342255a2260480701cc2ac2d0c623d4aba1348 (diff) |
actually evaluates and prints something now!
Diffstat (limited to 'src/ast.c')
-rw-r--r-- | src/ast.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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; +} |