summaryrefslogtreecommitdiff
path: root/base_cgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'base_cgen.c')
-rw-r--r--base_cgen.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/base_cgen.c b/base_cgen.c
index 0e1f7f9..537f1c5 100644
--- a/base_cgen.c
+++ b/base_cgen.c
@@ -149,6 +149,9 @@ static bool cgen_type_pre(CGenerator *g, Type *t) {
if (!cgen_type_pre(g, ret_type)) return false;
cgen_write(g, "(*");
} break;
+ case TYPE_ARR:
+ cgen_type_pre(g, t->arr.of);
+ break;
}
return true;
}
@@ -181,6 +184,10 @@ static bool cgen_type_post(CGenerator *g, Type *t) {
cgen_write_space(g);
if (!cgen_type_post(g, ret_type)) return false;
} break;
+ case TYPE_ARR:
+ cgen_write(g, "[%lu]", t->arr.n);
+ cgen_type_post(g, t->arr.of);
+ break;
}
return true;
}