Only define @ and _NARG when they have values (#1073)

Fixes #1069

Co-authored-by: Eldred Habert <eldredhabert0@gmail.com>
This commit is contained in:
Rangi
2022-09-30 19:04:03 -04:00
committed by GitHub
parent 140c6b169e
commit 08545643cf
16 changed files with 62 additions and 26 deletions

View File

@@ -0,0 +1,21 @@
; not inside a section
assert !DEF(@)
println @
println "{@}?"
; not inside a macro
assert !DEF(_NARG)
println _NARG
println "{_NARG}?"
SECTION "s", ROM0[$42]
assert DEF(@)
println @
println "{@}!"
MACRO m
assert DEF(_NARG)
println _NARG
println "{_NARG}!"
ENDM
m 1, 2, 3