Allow void macro result (#11286)
* allow void macro result * add test for void macro result type
This commit is contained in:
parent
68b5e3e3fe
commit
f94ec363ab
25 changed files with 143 additions and 60 deletions
|
|
@ -38,7 +38,7 @@ macro importImpl_forward(name, returns: untyped): untyped =
|
|||
decls.add res
|
||||
echo(repr(res))
|
||||
|
||||
macro importImpl(name, returns, body: untyped): typed =
|
||||
macro importImpl(name, returns, body: untyped) =
|
||||
#var res = getAST(importImpl_forward(name, returns))
|
||||
discard getAST(importImpl_forward(name, returns))
|
||||
var res = copyNimTree(decls[decls.high])
|
||||
|
|
@ -46,7 +46,7 @@ macro importImpl(name, returns, body: untyped): typed =
|
|||
echo repr(res)
|
||||
impls.add res
|
||||
|
||||
macro okayy: typed =
|
||||
macro okayy() =
|
||||
result = newNimNode(nnkStmtList)
|
||||
for node in decls: result.add node
|
||||
for node in impls: result.add node
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue