diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2019-08-27 14:38:15 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2019-08-27 14:38:15 -0400 |
commit | 126c496ad8a6e9a3b90ecd25c8ff3ead630f7f65 (patch) | |
tree | e4bccdc0652e1c72d756bdb03e2a7e30b6119b84 /types_cgen.c | |
parent | b40f9a3fe9f648f685649f65977ad595c998cbb7 (diff) |
checked undeclared identifiers; not totally done yet
Diffstat (limited to 'types_cgen.c')
-rw-r--r-- | types_cgen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/types_cgen.c b/types_cgen.c index 0eaa4b3..541f1b5 100644 --- a/types_cgen.c +++ b/types_cgen.c @@ -1,5 +1,5 @@ static bool cgen_types_stmt(CGenerator *g, Statement *s); -static bool cgen_types_fn(CGenerator *g, FnExpr *f) { +static bool cgen_types_fn(CGenerator *g, FnExpr *f, Location where) { bool ret = true; /* assign an ID to the function */ if (f->name) { @@ -27,7 +27,7 @@ static bool cgen_types_expr(CGenerator *g, Expression *e) { if (e->fn.name && g->block == NULL) { /* write named function prototypes in global scope to header file */ g->writing_to = CGEN_WRITING_TO_H; } - if (!cgen_types_fn(g, &e->fn)) + if (!cgen_types_fn(g, &e->fn, e->where)) return false; g->writing_to = CGEN_WRITING_TO_C; } break; |