frontend: implement an ast node printer

This commit is contained in:
2024-12-01 13:19:48 +00:00
parent c9dbc2e7e4
commit bb34e46c69
3 changed files with 220 additions and 2 deletions

View File

@@ -84,7 +84,9 @@ static int compile_file(const char *path, const b_arglist *args)
if (!lex_only && r == 0) {
struct ivy_ast_node *root = ivy_parser_root_node(parser);
ivy_ast_node_print(root);
struct ivy_ast_node_iterator it = {0};
ivy_ast_node_iterate(root, &it, print_ast_node);
// ivy_ast_node_print(root);
}
if (lex) {