From 15dbc99cb975675b89f5efe714d5209bce972014 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 4 Mar 2021 16:45:30 +0000 Subject: Minimize TokenPos size by using `i32` for line/column/offset and file_id instead of `String` To make `i32` safe, the parser limits the file size of odin files to a maximum of 2GiB (which will be good enough for the vast vast majority of cases) --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 04347e6ac..b1fc8fd35 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1845,7 +1845,7 @@ void print_show_unused(Checker *c) { } if (build_context.show_unused_with_location) { TokenPos pos = e->token.pos; - print_usage_line(2, "%.*s(%td:%td) %.*s", LIT(pos.file), pos.line, pos.column, LIT(e->token.string)); + print_usage_line(2, "%s %.*s", token_pos_to_string(pos), LIT(e->token.string)); } else { print_usage_line(2, "%.*s", LIT(e->token.string)); } -- cgit v1.2.3