aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-06-21 02:04:37 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-06-21 02:04:37 +0200
commit5e384049170dcb9e7e8aae5e98729bbc26661f90 (patch)
tree26dfca606d4c55ca1917f7dd5da9eb211db82275 /src/main.c
parent81ad5bea2fab5eec6c4d9a017f1acc5a53dbde47 (diff)
Huge changes to static analysis
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 8 insertions, 2 deletions
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;
}