shithub: rgbds

ref: 71e22f3bfe52a4e33b6a77e860dd6f80f4bb7e53
dir: /test/asm/macro-arguments.asm/

View raw version
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