Add multiline echo macro example
This commit is contained in:
parent
9ff1e441ab
commit
02ab74ac8b
|
@ -0,0 +1,13 @@
|
||||||
|
import macros
|
||||||
|
|
||||||
|
macro echoAll(body: untyped): untyped =
|
||||||
|
result = newStmtList()
|
||||||
|
|
||||||
|
for s in body:
|
||||||
|
result.add newCall(bindSym"echo", s)
|
||||||
|
|
||||||
|
|
||||||
|
echoAll:
|
||||||
|
"Hello"
|
||||||
|
"World"
|
||||||
|
1234
|
Loading…
Reference in New Issue