Only restore parent context's \@ value if it had one defined (#1366)

This way, if a child context initializes `\@`, the parent won't
reset it. And if the child context did not initialize `\@`,
then resetting it would be redundant.
This commit is contained in:
Sylvie
2024-03-21 19:53:49 -04:00
committed by GitHub
parent 0f772932a5
commit f792580816
7 changed files with 108 additions and 5 deletions

View File

@@ -0,0 +1,27 @@
REPT 2
println "Within REPT"
INCLUDE "unique-id-include.inc"
println "Outside INCLUDE: \@"
ENDR
MACRO m1
println "Within MACRO"
INCLUDE "unique-id-include.inc"
println "Outside INCLUDE: \@"
ENDM
m1
println
REPT 2
println "Within REPT: \@"
INCLUDE "unique-id-include.inc"
println "Outside INCLUDE: \@"
ENDR
MACRO m2
println "Within MACRO: \@"
INCLUDE "unique-id-include.inc"
println "Outside INCLUDE: \@"
ENDM
m2