summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-03-10 17:55:07 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2020-03-10 17:55:07 -0400
commit03f5b9a9963be1935aacd27799155d5d7115cedb (patch)
treeed1b8abc8f60800457d246fdef68354c14f5b9a3
parent75f007ff13b551aca207d6bc6ea78dbff6e15265 (diff)
some minor things involving varargs for loop
-rw-r--r--types.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/types.c b/types.c
index da0889a..74f0c55 100644
--- a/types.c
+++ b/types.c
@@ -1624,6 +1624,7 @@ static Status types_expr(Typer *tr, Expression *e) {
sub->stmts[0].where = e->where;
/* declare value */
Declaration *decl = sub->stmts[0].decl = typer_calloc(tr, 1, sizeof *decl);
+ decl->where = fo->of->where;
*(Identifier *)arr_adda(&decl->idents, tr->allocr) = fo->value;
fo->value->decl_kind = IDECL_DECL;
fo->value->decl = decl;
@@ -1634,6 +1635,7 @@ static Status types_expr(Typer *tr, Expression *e) {
Expression *index = decl->expr.binary.rhs = typer_calloc(tr, 1, sizeof *decl->expr.binary.rhs);
index->kind = EXPR_LITERAL_INT;
index->intl = (U64)i;
+ index->where = fo->of->where;
}
size_t start = has_val;
for (size_t s = start; s < total_nstmts; ++s) {