aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap/parse.c')
-rw-r--r--bootstrap/parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bootstrap/parse.c b/bootstrap/parse.c
index 4372cdc..381cfcc 100644
--- a/bootstrap/parse.c
+++ b/bootstrap/parse.c
@@ -544,7 +544,7 @@ parsefntype(struct parser *P) {
ty.fn.variadic = 1;
} else {
const struct type *param;
- lexexpects(P, TKident, "parameter name");
+ tok = lexexpects(P, TKident, "parameter name");
param = parsetype(P);
if (!completetype(param))
fatal(P, tok.span, "parameter type is incomplete (%t)",
@@ -1863,7 +1863,7 @@ parsefn(struct decl *decl, struct parser *P) {
if (lexmatch(P, &tok, '...')) {
fn->variadic = 1;
} else {
- param.name = lexexpects(P, TKident, "parameter name").str;
+ param.name = (tok = lexexpects(P, TKident, "parameter name")).str;
param.ty = parsetype(P);
if (!completetype(param.ty))
fatal(P, tok.span, "parameter type is incomplete (%t)",