mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
This applies to macro arguments, DB, DW, DL, DS, PRINT, PRINTLN, EXPORT, PURGE, and OPT. It also removes support for empty entries in DB/DW/DL. (Deprecating it would require keeping parser support, which is ambiguous with trailing commas.) Fixes #753
28 lines
644 B
NASM
28 lines
644 B
NASM
mac: MACRO
|
|
println "'mac \#':"
|
|
for i, _NARG
|
|
println strfmt("\\%d: <\1>", i+1)
|
|
shift
|
|
endr
|
|
println
|
|
ENDM
|
|
|
|
mac /* block
|
|
...comment */ ; comment
|
|
mac /*a*/ 1 , 2 /*b*/ , ; trailing comma
|
|
mac \
|
|
c, d
|
|
mac 1, 2 + /* another ;
|
|
; comment */ 2, 3
|
|
|
|
mac a b ; truncated
|
|
|
|
mac
|
|
mac ,
|
|
mac a,
|
|
mac a,,
|
|
mac ,,z
|
|
mac a,,z
|
|
mac ,a,b,c,
|
|
mac ,,x,,,
|
|
mac E,O,F ; no newline |