diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-06-21 02:04:37 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-06-21 02:04:37 +0200 |
commit | 5e384049170dcb9e7e8aae5e98729bbc26661f90 (patch) | |
tree | 26dfca606d4c55ca1917f7dd5da9eb211db82275 /src/main.c | |
parent | 81ad5bea2fab5eec6c4d9a017f1acc5a53dbde47 (diff) |
Huge changes to static analysis
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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; } |