Improve error stack

The old error stack was fairly obtuse and hard to use for debugging.
This improves it notably by ensuring all line numbers are relative
to the file, and not, say, the macro definition.
This is a breaking change if you were parsing the old stack, but
the change should be painless, and the new stack only brings more info.
The syntax is unchanged for files, macros see their name prefixed
with the file they're defined in and a pair of colors, REPT blocks
simply append a '::REPT~n' to the context they're in, where 'n' is
the number of iterations the REPT has done.
This is especially helpful in macro-heavy code such as rgbds-structs.
This commit is contained in:
ISSOtm
2019-08-29 17:03:50 +02:00
parent 4ef27a0d23
commit 37089ef940
15 changed files with 100 additions and 36 deletions

View File

@@ -1,4 +1,4 @@
ERROR: label-macro-arg.asm(45) -> test_char(2):
ERROR: label-macro-arg.asm(45) -> label-macro-arg.asm::test_char(31):
Macro 'something' not defined
$5
$6