aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/cgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap/cgen.c')
-rw-r--r--bootstrap/cgen.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/bootstrap/cgen.c b/bootstrap/cgen.c
index 14f36f1..8b7b710 100644
--- a/bootstrap/cgen.c
+++ b/bootstrap/cgen.c
@@ -146,9 +146,15 @@ geniniex(struct expr *ex) {
for (int i = 0; i < ex->ini.args.n; ++i) {
struct iniarg *arg = &ex->ini.args.d[i];
if (ex->ty->t == TYarr)
- pri("[%I] = %e, ", arg->idx, &arg->ex);
+ if (arg->ex.t == Eini)
+ pri("[%I] = %n, ", arg->idx, &arg->ex);
+ else
+ pri("[%I] = %e, ", arg->idx, &arg->ex);
else
- pri(".%s_ = %e, ", arg->fld, &arg->ex);
+ if (arg->ex.t == Eini)
+ pri(".%s_ = %n, ", arg->fld, &arg->ex);
+ else
+ pri(".%s_ = %e, ", arg->fld, &arg->ex);
}
pri("}");