From f2297c20b69d942fd1e8fdcdd8f4d142c71de662 Mon Sep 17 00:00:00 2001 From: Matthew Sotoudeh Date: Sun, 30 Jul 2023 18:09:52 -0700 Subject: bad line numbers support --- tokenize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tokenize.c') diff --git a/tokenize.c b/tokenize.c index 5c49c02..4cfb1bd 100644 --- a/tokenize.c +++ b/tokenize.c @@ -64,14 +64,14 @@ void error_at(char *loc, char *fmt, ...) { void error_tok(Token *tok, char *fmt, ...) { va_list ap; va_start(ap, fmt); - verror_at(tok->file->name, tok->file->contents, tok->line_no, tok->loc, fmt, ap); + verror_at(tok->filename, tok->file->contents, tok->line_no, tok->loc, fmt, ap); exit(1); } void warn_tok(Token *tok, char *fmt, ...) { va_list ap; va_start(ap, fmt); - verror_at(tok->file->name, tok->file->contents, tok->line_no, tok->loc, fmt, ap); + verror_at(tok->filename, tok->file->contents, tok->line_no, tok->loc, fmt, ap); va_end(ap); } -- cgit v1.2.3