Files
rgbds/test/asm/macro-arg-parentheses.asm
Rangi 27f38770d4 Parentheses in macro args prevent commas from starting new arguments
This is similar to C's behavior, and convenient for passing
function calls as single values, like `MUL(3.0, 4.0)` or
`STRSUB("str", 2, 1)`.

Fixes #704
2021-04-23 14:28:10 +02:00

20 lines
268 B
NASM

MACRO printargs
REPT _NARG
PRINTLN \1
SHIFT
ENDR
ENDM
printargs mul(3.0, 4.0)
MACRO printlit
REPT _NARG
PRINTLN "\1"
SHIFT
ENDR
ENDM
printlit a(b,c\,d), ((e,f),g), ))h, i\,j,
printlit \(k, l), (m:\)n,o(p)q), (r,s)t
printlit "))u,v(", ("w,x","y,z"),