aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-06-22 08:24:53 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-06-22 08:24:53 +0200
commit9e127d92246d6577792122b013088466e3688da1 (patch)
treeedb73aa03739bf37626aae3038586a80d3b1aa50 /src/main.c
parentf75e2f8b54ea9d77e94aca6e387556981a7795d3 (diff)
Store decl info in auxilliary data
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 5bd30fe..86e8e54 100644
--- a/src/main.c
+++ b/src/main.c
@@ -31,12 +31,13 @@ main(int argc, char **argv)
arena a = NULL;
mpq_t *folds;
+ struct aux aux;
struct type *types;
struct scope *scps;
struct lexemes toks = lexstring(src, srclen);
- struct ast ast = parsetoks(toks);
- analyzeprog(ast, toks, &a, &types, &scps, &folds);
+ struct ast ast = parsetoks(toks, &aux);
+ analyzeprog(ast, aux, toks, &a, &types, &scps, &folds);
codegen(argv[1], folds, scps, types, ast, toks);
#if DEBUG
@@ -51,6 +52,7 @@ main(int argc, char **argv)
free(types);
lexemes_free(toks);
ast_free(ast);
+ aux_free(aux);
arena_free(&a);
#endif
return EXIT_SUCCESS;