diff options
| author | gingerBill <bill@gingerbill.org> | 2024-03-20 11:06:02 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-03-20 11:06:02 +0000 |
| commit | e4c502e79b4fba9924aac4ff029889a494d3f1ae (patch) | |
| tree | d19c9166c4d00f7e995ed4af46357262fd1a10d9 /src/error.cpp | |
| parent | 553a244fec29f4bf2b32f9813ceb578fa46909fd (diff) | |
Add `offset` (in bytes) field to `-json-errors`
Diffstat (limited to 'src/error.cpp')
| -rw-r--r-- | src/error.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/error.cpp b/src/error.cpp index 8d550e969..b96719420 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -670,6 +670,7 @@ gb_internal void print_all_errors(void) { escape_char(f, file.text[k]); } gb_fprintf(f, "\",\n"); + gb_fprintf(f, "\t\t\t\t\"offset\": %d,\n", ev.pos.offset); gb_fprintf(f, "\t\t\t\t\"line\": %d,\n", ev.pos.line); gb_fprintf(f, "\t\t\t\t\"column\": %d,\n", ev.pos.column); i32 end_column = gb_max(ev.end.column, ev.pos.column); |