mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-06 04:57:55 +00:00
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)
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user