diff options
Diffstat (limited to 'lib/core/macros.nim')
-rw-r--r-- | lib/core/macros.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/core/macros.nim b/lib/core/macros.nim index ebc9f7714..ee6c1a09f 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -1226,3 +1226,8 @@ when not defined(booting): macro payload: untyped {.gensym.} = result = parseStmt(e) payload() + +macro unpackVarargs*(callee: untyped; args: varargs[untyped]): untyped = + result = newCall(callee) + for i in 0 ..< args.len: + result.add args[i] |