mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-22 19:22:05 +00:00
Fix fstack traces for macro nodes (#1318)
Since the lexer rewrite, MACRO nodes' fstack traces have not included their parent REPT nodes' names.
This commit is contained in:
41
test/asm/rept-macro-fstack-trace.asm
Normal file
41
test/asm/rept-macro-fstack-trace.asm
Normal file
@@ -0,0 +1,41 @@
|
||||
MACRO outer
|
||||
DEF it = 1
|
||||
DEF n = 0
|
||||
REPT 4
|
||||
IF n % 2 == 0
|
||||
IF DEF(inner)
|
||||
PURGE inner
|
||||
ENDC
|
||||
DEF s EQUS "\nMACRO inner\nREPT 2\nREPT 2\nWARN \"round \{d:it\}\"\nDEF it += 1\nENDR\nENDR\nENDM"
|
||||
s
|
||||
PURGE s
|
||||
ENDC
|
||||
inner
|
||||
DEF n += 1
|
||||
ENDR
|
||||
ENDM
|
||||
REPT 1
|
||||
outer
|
||||
ENDR
|
||||
|
||||
MACRO foo
|
||||
REPT 1
|
||||
REPT 1
|
||||
WARN "round {d:it}"
|
||||
DEF it += 1
|
||||
ENDR
|
||||
ENDR
|
||||
ENDM
|
||||
REPT 1
|
||||
REPT 1
|
||||
MACRO bar
|
||||
REPT 2
|
||||
REPT 2
|
||||
foo
|
||||
ENDR
|
||||
ENDR
|
||||
ENDM
|
||||
bar
|
||||
ENDR
|
||||
ENDR
|
||||
|
||||
Reference in New Issue
Block a user