summaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/parse.c b/parse.c
index c40e556..8c6beb1 100644
--- a/parse.c
+++ b/parse.c
@@ -2114,8 +2114,11 @@ static Status parse_expr(Parser *p, Expression *e, Token *end) {
return false;
goto success;
}
-
- tokr_err(t, "Unrecognized expression.");
+ Location where;
+ where.file = p->file;
+ where.start = (U32)(t->token - t->tokens);
+ where.end = (U32)(end - t->tokens);
+ err_print(where, "Unrecognized expression.");
return false;
}
}