diff options
author | Dominik Picheta <dominikpicheta@gmail.com> | 2017-05-17 20:05:21 +0100 |
---|---|---|
committer | Dominik Picheta <dominikpicheta@gmail.com> | 2017-05-17 20:05:21 +0100 |
commit | b2e649c09368edd2de59288c2a3c3096599c5fbe (patch) | |
tree | f9262cd1c80d1b0fd4866c073c01a7b07f94b693 /lib/core/macros.nim | |
parent | d1daccac2f9b9885f9c70ce52c10156d8b13b29c (diff) | |
download | Nim-b2e649c09368edd2de59288c2a3c3096599c5fbe.tar.gz |
Fixes regression introduced by #5739. Improves newNimNode proc.
Diffstat (limited to 'lib/core/macros.nim')
-rw-r--r-- | lib/core/macros.nim | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/core/macros.nim b/lib/core/macros.nim index 83776f16b..03ac09180 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -225,7 +225,13 @@ proc `ident=`*(n: NimNode, val: NimIdent) {.magic: "NSetIdent", noSideEffect.} proc `strVal=`*(n: NimNode, val: string) {.magic: "NSetStrVal", noSideEffect.} proc newNimNode*(kind: NimNodeKind, - n: NimNode=nil): NimNode {.magic: "NNewNimNode", noSideEffect.} + lineInfoFrom: NimNode=nil): NimNode + {.magic: "NNewNimNode", noSideEffect.} + ## Creates a new AST node of the specified kind. + ## + ## The ``lineInfoFrom`` parameter is used for line information when the + ## produced code crashes. You should ensure that it is set to a node that + ## you are transforming. proc copyNimNode*(n: NimNode): NimNode {.magic: "NCopyNimNode", noSideEffect.} proc copyNimTree*(n: NimNode): NimNode {.magic: "NCopyNimTree", noSideEffect.} |