mirror of
https://github.com/gbdev/rgbds.git
synced 2026-01-09 18:11:51 +00:00
Switch from parentheses to angle brackets
`\(` is more likely to be a valid escape sequence in the
future (as is `\[`) and `\{` is already taken.
This commit is contained in:
19
test/asm/bracketed-macro-args.asm
Normal file
19
test/asm/bracketed-macro-args.asm
Normal file
@@ -0,0 +1,19 @@
|
||||
MACRO printargs
|
||||
PRINTLN "first = \<1>"
|
||||
FOR I, 2, _NARG
|
||||
PRINTLN "next = \<{d:I}>"
|
||||
ENDR
|
||||
PRINTLN "last = \<{d:_NARG}>"
|
||||
ENDM
|
||||
|
||||
printargs A, B, C, D
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user