Merge pull request #7289 from alehander42/fix-asyncjs-pragma

Stop replacing all pragmas of a function with asyncjs
This commit is contained in:
Dominik Picheta 2018-03-05 11:12:01 +00:00 • committed by GitHub
commit 363c703e72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 1 deletions

View file

@ -129,9 +129,10 @@ proc generateJsasync(arg: NimNode): NimNode =
return `jsResolve`
result.body.add(voidFix)
result.pragma = quote:
let asyncPragma = quote:
{.codegenDecl: "async function $2($3)".}
result.addPragma(asyncPragma[0])
macro async*(arg: untyped): untyped =
## Macro which converts normal procedures into