Add "type" field to -json-errors

This commit is contained in:
gingerBill
2024-04-08 13:36:23 +01:00
parent 2aca370a0a
commit 16dc79fc5c

View File

@@ -667,6 +667,14 @@ gb_internal void print_all_errors(void) {
gb_fprintf(f, "\t\t{\n");
gb_fprintf(f, "\t\t\t\"type\": \"");
if (ev.kind == ErrorValue_Warning) {
gb_fprintf(f, "warning");
} else {
gb_fprintf(f, "error");
}
gb_fprintf(f, "\",\n");
gb_fprintf(f, "\t\t\t\"pos\": {\n");
if (ev.pos.file_id) {