From 5e384049170dcb9e7e8aae5e98729bbc26661f90 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Fri, 21 Jun 2024 02:04:37 +0200 Subject: Huge changes to static analysis --- src/main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 6cb715a..05228d7 100644 --- a/src/main.c +++ b/src/main.c @@ -27,16 +27,22 @@ main(int argc, char **argv) size_t srclen; char *src = readfile(argv[1], &srclen); + arena a = NULL; + struct type *types; + struct scope *scps; + struct lexemes toks = lexstring(src, srclen); struct ast ast = parsetoks(toks); - struct type *types = analyzeprog(ast, toks); + analyzeprog(ast, toks, &a, &types, &scps); // codegen(argv[1], types, ast, toks); #if DEBUG - free(types); + free(scps); free(src); + free(types); lexemes_free(toks); ast_free(ast); + arena_free(&a); #endif return EXIT_SUCCESS; } -- cgit v1.2.3