aboutsummaryrefslogtreecommitdiff
path: root/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'decl.c')
-rw-r--r--decl.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/decl.c b/decl.c
index b771a04..a65d7c6 100644
--- a/decl.c
+++ b/decl.c
@@ -951,17 +951,10 @@ decl(struct scope *s, struct func *f)
}
break;
}
- switch (tok.kind) {
- case TCOMMA:
- next();
- allowfunc = 0;
- break;
- case TSEMICOLON:
- next();
+ if (consume(TSEMICOLON))
return true;
- default:
- error(&tok.loc, "expected ',' or ';' after declarator");
- }
+ expect(TCOMMA, "or ';' after declarator");
+ allowfunc = 0;
}
}