aboutsummaryrefslogtreecommitdiffhomepage
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 f8ad4f1..d55d599 100644
--- a/parse.c
+++ b/parse.c
@@ -79,7 +79,8 @@ Token* expect(Parser* p, TokenKind expected) {
if (t->kind == expected) {
return t;
}
- fatal_error("expected '%s', but got '%s'", token_kind_stringify(expected), token_stringify(t));
+ fatal_error("%s:%d: expected '%s', but got '%s'", t->loc.filename, t->loc.line, token_kind_stringify(expected),
+ token_stringify(t));
}
int find_lvar(Parser* p, const String* name) {