mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-18 23:11:36 +00:00
added macros.unpackVarargs
This commit is contained in:
@@ -117,3 +117,4 @@ This now needs to be written as:
|
||||
your code work with both old and new Nim versions.
|
||||
See [special-operators](https://nim-lang.org/docs/manual.html#special-operators)
|
||||
for more information.
|
||||
- Added ``macros.unpackVarargs``.
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user