aboutsummaryrefslogtreecommitdiff
path: root/src/lower.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-08-17 20:47:33 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-08-17 20:47:33 +0300
commit395efb9c8a0a0160a7b95769e9484bae5548bbde (patch)
treea5b4dc24dd3a2097d055b66b0cde8e23832802eb /src/lower.c
parent2023a7b2d9656f80b00de81453348c0a66f200f7 (diff)
downloadek-395efb9c8a0a0160a7b95769e9484bae5548bbde.tar.gz
ek-395efb9c8a0a0160a7b95769e9484bae5548bbde.zip
add analyzer and fix some reported issues
Diffstat (limited to 'src/lower.c')
-rw-r--r--src/lower.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lower.c b/src/lower.c
index a01dd40..4093cbf 100644
--- a/src/lower.c
+++ b/src/lower.c
@@ -279,13 +279,14 @@ static int lower_param(struct lower_state *s, struct ast *p, struct vec *fixups)
assert(p->k == AST_VAR_DEF);
assert(var_init(p) == NULL);
- if (is_primitive(p->t) || p->t->k == TYPE_PTR || p->t->k == TYPE_CALLABLE) {
+ if (is_primitive(p->t) || p->t->k == TYPE_PTR ||
+ p->t->k == TYPE_CALLABLE) {
return lower_simple_param(s, p);
}
if (p->t->k != TYPE_STRUCT) {
semantic_error(p->scope->fctx, p,
- "illegal type");
+ "illegal type");
return -1;
}