Add string expansion reporting

And fix line counting with expansion-made newlines.
This has the same bug as the old lexer (equs-newline's output does not
print the second warning as being part of the expansion).
Additionally, we regress equs-recursion, as we are no longer able to
catch this specific EQUS recursion. Simply enough, the new expansion
begins **after** the old one ends! I have found no way to handle that.
This commit is contained in:
ISSOtm
2020-07-29 00:39:18 +02:00
parent 5ad7a93750
commit 61b2fd9816
7 changed files with 64 additions and 4 deletions

View File

@@ -0,0 +1,4 @@
ACT equs "WARN \"First\"\nWARN \"Second\""
ACT
WARN "Third"

View File

@@ -0,0 +1,8 @@
warning: test/asm/equs-newline.asm(2): [-Wuser]
First
while expanding symbol "ACT"
warning: test/asm/equs-newline.asm(3): [-Wuser]
Second
while expanding symbol "ACT"
warning: test/asm/equs-newline.asm(4): [-Wuser]
Third

View File

2
test/asm/equs-purge.asm Normal file
View File

@@ -0,0 +1,2 @@
BYE equs "PURGE BYE\nWARN \"Crash?\"\n \n"
BYE

3
test/asm/equs-purge.err Normal file
View File

@@ -0,0 +1,3 @@
warning: test/asm/equs-purge.asm(0): [-Wuser]
Crash?
while expanding symbol "BYE"

0
test/asm/equs-purge.out Normal file
View File