diff options
author | Preston Pan <preston@nullring.xyz> | 2023-01-03 17:59:18 -0800 |
---|---|---|
committer | Preston Pan <preston@nullring.xyz> | 2023-01-03 17:59:18 -0800 |
commit | 2fe28946e426e241e87e8381d7a62e73b9278385 (patch) | |
tree | b374061dab88629c0b418fc4c9495711ba643143 /src/main.c | |
parent | f8cedce5299d12adc3ce3249fd5b3a9fe5578c0a (diff) |
fix bug
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -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; } |