Minor fixes for asyncjs (#8894)
* Minor fixes for asyncjs Mark internal procedures as used Allow .async. for more node kinds Make .async. work for nkStmtList * Fix logic error in both the async macros
This commit is contained in:
parent
1e6eca973d
commit
90025e242d
2 changed files with 13 additions and 5 deletions
|
|
@ -327,8 +327,8 @@ macro async*(prc: untyped): untyped =
|
|||
## Macro which processes async procedures into the appropriate
|
||||
## iterators and yield statements.
|
||||
if prc.kind == nnkStmtList:
|
||||
result = newStmtList()
|
||||
for oneProc in prc:
|
||||
result = newStmtList()
|
||||
result.add asyncSingleProc(oneProc)
|
||||
else:
|
||||
result = asyncSingleProc(prc)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue