diff options
author | Ting-Wei Lan <lantw44@gmail.com> | 2015-12-30 15:33:33 +0800 |
---|---|---|
committer | Ting-Wei Lan <lantw44@gmail.com> | 2015-12-30 15:33:33 +0800 |
commit | 463be4aa241f9c9b8453ba46a89ce5d67995c55b (patch) | |
tree | 8575ce34c28d0cc10a4b3a98ced553a504e7c7d4 /src/main.c | |
parent | 0c0c7ab0850b6803c377ad7150305870d75bf3c0 (diff) | |
download | compiler2015-463be4aa241f9c9b8453ba46a89ce5d67995c55b.tar compiler2015-463be4aa241f9c9b8453ba46a89ce5d67995c55b.tar.gz compiler2015-463be4aa241f9c9b8453ba46a89ce5d67995c55b.tar.bz2 compiler2015-463be4aa241f9c9b8453ba46a89ce5d67995c55b.tar.lz compiler2015-463be4aa241f9c9b8453ba46a89ce5d67995c55b.tar.xz compiler2015-463be4aa241f9c9b8453ba46a89ce5d67995c55b.tar.zst compiler2015-463be4aa241f9c9b8453ba46a89ce5d67995c55b.zip |
Drop any_error from state and add asm_output to state
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -96,13 +96,12 @@ int main (int argc, char **argv) else exit(1); - FILE *asm_output = fopen("output.s", "w"); - if (asm_output == NULL) { + state->asm_output = fopen("output.s", "w"); + if (state->asm_output == NULL) { fprintf(stderr, "%s: output.s: %s\n", prog_name, ERR_MSG); exit(1); } - ccmmc_code_generation(state->ast, state->table, asm_output); - fclose(asm_output); + ccmmc_code_generation(state); ccmmc_state_fini(state); fclose(source_handle); |