summaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index 5f6a506..3676ad9 100644
--- a/parse.c
+++ b/parse.c
@@ -619,13 +619,14 @@ static bool parser_is_definitely_type(Parser *p, Token **end) {
t->token++;
if (token_is_kw(t->token, KW_LBRACE)) goto end; /* void fn expr */
Type return_type;
+ bool prev = t->token->where.ctx->enabled;
t->token->where.ctx->enabled = false;
if (!parse_type(p, &return_type)) {
/* couldn't parse a return type. void fn type */
ret = true;
goto end;
}
-
+ t->token->where.ctx->enabled = prev;
if (token_is_kw(t->token, KW_LBRACE)) {
/* non-void fn expr */
goto end;