diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1,7 +1,5 @@ /* TODO: -fix casting for slice => ptr/arr -parameters can be passed as pointers new returns a *slice* unicode variable names make sure initializers for global variables are compile-time constants @@ -77,6 +75,10 @@ int main(int argc, char **argv) { Evaluator ev; evalr_create(&ev); typer_create(&tr, &ev); + + if (!block_enter(NULL, f.stmts)) /* enter global scope */ + return false; + if (!types_file(&tr, &f)) { err_fprint(TEXT_IMPORTANT("Errors occured while determining types.\n")); return EXIT_FAILURE; @@ -93,6 +95,8 @@ int main(int argc, char **argv) { cgen_create(&g, out, &file_idents, &ev); cgen_file(&g, &f); + block_exit(NULL, f.stmts); /* exit global scope */ + tokr_free(&t); free(contents); |