aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index b32a723..2cfc1d1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -29,10 +29,11 @@ main(int argc, char **argv)
struct lexemes toks = lexstring(src, srclen);
struct ast ast = parsetoks(toks);
- analyzeast(ast, toks);
- codegen(ast, toks);
+ struct type *types = analyzeast(ast, toks);
+ codegen(argv[1], types, ast, toks);
#if DEBUG
+ free(types);
free(src);
lexemes_free(toks);
ast_free(ast);