mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-18 20:40:28 +00:00
Add ODIN_ERROR_POS_STYLE environment variable
Allowing for two different error message styles:
default or odin
path(line:column) message
unix
path:line:column: message
This commit is contained in:
@@ -201,14 +201,6 @@ struct TokenPos {
|
||||
i32 column; // starting at 1
|
||||
};
|
||||
|
||||
// temporary
|
||||
char *token_pos_to_string(TokenPos const &pos) {
|
||||
gbString s = gb_string_make_reserve(temporary_allocator(), 128);
|
||||
String file = get_file_path_string(pos.file_id);
|
||||
s = gb_string_append_fmt(s, "%.*s(%d:%d)", LIT(file), pos.line, pos.column);
|
||||
return s;
|
||||
}
|
||||
|
||||
i32 token_pos_cmp(TokenPos const &a, TokenPos const &b) {
|
||||
if (a.offset != b.offset) {
|
||||
return (a.offset < b.offset) ? -1 : +1;
|
||||
|
||||
Reference in New Issue
Block a user