mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Only increment the unique \@ ID when it is first used per context (#1030)
This avoids changes to generated `\@` labels just by adding or removing macros or loops which do not actually use `\@`. Fixes #1019
This commit is contained in:
22
test/asm/unique-id-values.asm
Normal file
22
test/asm/unique-id-values.asm
Normal file
@@ -0,0 +1,22 @@
|
||||
MACRO m
|
||||
println " m: \@"
|
||||
for q, \#
|
||||
if q % 2 == 0
|
||||
println " q = {d:q}: \@"
|
||||
else
|
||||
println " q = {d:q}"
|
||||
endc
|
||||
endr
|
||||
println " (m: still \@)"
|
||||
ENDM
|
||||
|
||||
for p, 10
|
||||
if p % 3 == 0
|
||||
println "p = {d:p}: \@"
|
||||
m 3
|
||||
m 3, 6
|
||||
println " (p: still \@)"
|
||||
else
|
||||
println "p = {d:p}"
|
||||
endc
|
||||
endr
|
||||
Reference in New Issue
Block a user