aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
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;
}