From 51c4defc436c0d119941eb6d5b953d27b5b8e6f7 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 7 Aug 2021 23:39:21 +0200 Subject: Better error logging --- src/treeify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/treeify.c') diff --git a/src/treeify.c b/src/treeify.c index 8da6481..5539d21 100644 --- a/src/treeify.c +++ b/src/treeify.c @@ -12,7 +12,7 @@ static void __expect(struct ctx *ctx, struct token *token, enum token_type type, if (token->type != type) { printf("[DBG] %s:%d: %s\n", file, line, func); token_print(ctx, token); - err("Expected token of type %s!\n", type_enum); + errln(&token->location, "Expected token of type %s", type_enum); } } -- cgit v1.2.3