From 2fe28946e426e241e87e8381d7a62e73b9278385 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Tue, 3 Jan 2023 17:59:18 -0800 Subject: fix bug --- src/main.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 12ec987..266fb2c 100644 --- a/src/main.c +++ b/src/main.c @@ -40,17 +40,11 @@ int main(int argc, char **argv) { /* printf("lmao\n"); */ /* } */ /* } */ - /* TEST PARSER, VISITOR, PRINTER */ - lexer_t *lexer = init_lexer("34.4"); + lexer_t *lexer = init_lexer("\"hello world\""); parser_t *parser = init_parser(lexer); - - ast_t *root = parse_expr(parser); - - visitor_t *v = init_visitor(root); - - ast_t *res = eval_expr(v, root); - - print(res); + visitor_t *visitor = init_visitor(parser); + ast_t *root = eval(visitor); + print_root(root); return 0; } -- cgit