summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2019-09-01 15:21:25 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2019-09-01 15:21:25 -0400
commitcc7d494226f41d76208bd2a0613a26435247cc87 (patch)
tree77ba93bae293ea2e2299ab54bea5c0f58065bce0 /main.c
parent8640ec94e95156551ce90a8fe4d96eddc6e66f88 (diff)
improved the way identifiers worked (now they use a single block array)
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.c b/main.c
index babecc7..1721269 100644
--- a/main.c
+++ b/main.c
@@ -36,7 +36,8 @@ int main(int argc, char **argv) {
fclose(in);
err_filename = in_filename;
- Identifiers file_idents = {0};
+ Identifiers file_idents;
+ idents_create(&file_idents);
Tokenizer t;
tokr_create(&t, &file_idents);
if (!tokenize_string(&t, contents)) {
@@ -72,7 +73,7 @@ int main(int argc, char **argv) {
FILE *c_out = fopen(c_out_filename, "w");
FILE *h_out = fopen(h_out_filename, "w");
CGenerator cgen;
- cgen_create(&cgen, c_out, h_out, h_out_filename);
+ cgen_create(&cgen, &file_idents, c_out, h_out, h_out_filename);
if (!cgen_file(&cgen, &f)) {
err_fprint(TEXT_IMPORTANT("Errors occured while generating C code.\n"));
return EXIT_FAILURE;