From 6fa1524766dc9e521c372c02e97090e63f8ed54d Mon Sep 17 00:00:00 2001 From: Max Wash Date: Sun, 24 Nov 2024 20:50:32 +0000 Subject: [PATCH] frontend: repl: print the ast after each line of input --- frontend/cmd/repl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/cmd/repl.c b/frontend/cmd/repl.c index b51c81c..3c6f6cd 100644 --- a/frontend/cmd/repl.c +++ b/frontend/cmd/repl.c @@ -109,10 +109,13 @@ static int repl_full() continue; } - if (!ivy_parser_node_complete(parser)) { + if (!ivy_parser_is_node_complete(parser)) { continue; } + struct ivy_ast_node *root = ivy_parser_root_node(parser); + ivy_ast_node_print(root); +#if 0 struct ivy_ast_node *node = ivy_parser_dequeue_node(parser); if (!node) { continue; @@ -120,6 +123,7 @@ static int repl_full() ivy_ast_node_print(node); ivy_ast_node_destroy(node); +#endif } ivy_parser_destroy(parser);