diff options
| author | gingerBill <bill@gingerbill.org> | 2021-03-04 16:45:30 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-03-04 16:45:30 +0000 |
| commit | 15dbc99cb975675b89f5efe714d5209bce972014 (patch) | |
| tree | f4afc5894fa21b2e42609bf1555ee57a177f8a1f /src/main.cpp | |
| parent | 17eb0ce525ffe94f13aabbc8d2245a9fda61aba0 (diff) | |
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)
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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)); } |