mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Support numeric symbol names in \(parentheses)
For example, \(_NARG) will get the last argument
This commit is contained in:
1
test/asm/invalid-macro-arg-symbol.asm
Normal file
1
test/asm/invalid-macro-arg-symbol.asm
Normal file
@@ -0,0 +1 @@
|
||||
\(foo)
|
||||
2
test/asm/invalid-macro-arg-symbol.err
Normal file
2
test/asm/invalid-macro-arg-symbol.err
Normal file
@@ -0,0 +1,2 @@
|
||||
FATAL: invalid-macro-arg-symbol.asm(1):
|
||||
Parenthetic symbol "foo" does not exist
|
||||
0
test/asm/invalid-macro-arg-symbol.out
Normal file
0
test/asm/invalid-macro-arg-symbol.out
Normal file
@@ -12,6 +12,8 @@ MACRO mac
|
||||
println \(2__) + \(1_2) + \(\1)
|
||||
x = 2
|
||||
println \({d:x}) + \(1_{d:x}) + \(\(\(13)))
|
||||
y equs "NARG"
|
||||
println \(x) + \(1_{d:x}_) + \(\(\(_{y})))
|
||||
ENDM
|
||||
|
||||
mac 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 1
|
||||
|
||||
@@ -4,3 +4,4 @@ next = C
|
||||
last = D
|
||||
$F0
|
||||
$F0
|
||||
$F0
|
||||
|
||||
Reference in New Issue
Block a user