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:
Rangi
2022-08-31 17:45:21 -04:00
committed by GitHub
parent a52a00a9ca
commit c01317e08d
5 changed files with 88 additions and 6 deletions

View 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