Support /* block comments */ in macro arguments

Fixes #746
This commit is contained in:
Rangi
2021-02-17 16:30:03 -05:00
committed by Rangi
parent e7d6ddf593
commit fad48326f8
4 changed files with 42 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
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*/
mac \
c, d
mac 1, 2 + /* another ;
; comment */ 2, 3

View File

View File

@@ -0,0 +1,15 @@
'mac ':
'mac 1,2':
\1: < 1>
\2: <2>
'mac c,d':
\1: < c>
\2: <d>
'mac 1,2 + 2,3':
\1: <1>
\2: <2 + 2>
\3: <3>