mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-13 23:03:16 +00:00
Add -json-errors
This commit is contained in:
@@ -392,6 +392,7 @@ struct BuildContext {
|
||||
bool warnings_as_errors;
|
||||
bool hide_error_line;
|
||||
bool terse_errors;
|
||||
bool json_errors;
|
||||
bool has_ansi_terminal_colours;
|
||||
|
||||
bool ignore_lazy;
|
||||
@@ -1270,14 +1271,17 @@ gb_internal String get_fullpath_core_collection(gbAllocator a, String path, bool
|
||||
}
|
||||
|
||||
gb_internal bool show_error_line(void) {
|
||||
return !build_context.hide_error_line;
|
||||
return !build_context.hide_error_line && !build_context.json_errors;
|
||||
}
|
||||
|
||||
gb_internal bool terse_errors(void) {
|
||||
return build_context.terse_errors;
|
||||
}
|
||||
gb_internal bool json_errors(void) {
|
||||
return build_context.json_errors;
|
||||
}
|
||||
gb_internal bool has_ansi_terminal_colours(void) {
|
||||
return build_context.has_ansi_terminal_colours;
|
||||
return build_context.has_ansi_terminal_colours && !json_errors();
|
||||
}
|
||||
|
||||
gb_internal bool has_asm_extension(String const &path) {
|
||||
|
||||
Reference in New Issue
Block a user