Support multi-digit macro arguments in parentheses

This allows access to arguments past \9 without using 'shift'
This commit is contained in:
Rangi
2021-04-18 23:26:03 -04:00
committed by Eldred Habert
parent 8230e8165c
commit 637bbbdf43
11 changed files with 125 additions and 35 deletions

View File

@@ -0,0 +1,17 @@
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)))
ENDM
mac 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 1