nim-cookbook/multiline_echo.nim

14 lines
188 B
Nim
Raw Permalink Normal View History

2020-04-21 16:54:42 +00:00
import macros
macro echoAll(body: untyped): untyped =
result = newStmtList()
for s in body:
result.add newCall(bindSym"echo", s)
echoAll:
"Hello"
"World"
1234