summary refs log tree commit diff stats
path: root/lib/core/macros.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-09-14 15:48:07 +0200
committerAraq <rumpf_a@web.de>2018-09-14 15:48:07 +0200
commit5709736e827ef844c98afa8fcad08d2f789f93b4 (patch)
tree7fecb2f49b475163b699c702ccd75d99d0357fb5 /lib/core/macros.nim
parent5ee904643af3c5bf126121cd9534ddcb11cd4630 (diff)
parent382fe446c3926f7976de09b7a1d8ad131912c7b6 (diff)
downloadNim-5709736e827ef844c98afa8fcad08d2f789f93b4.tar.gz
Merge branch 'devel' into araq-better-docgen
Diffstat (limited to 'lib/core/macros.nim')
-rw-r--r--lib/core/macros.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/core/macros.nim b/lib/core/macros.nim
index 4d76d60c2..aec766068 100644
--- a/lib/core/macros.nim
+++ b/lib/core/macros.nim
@@ -240,7 +240,7 @@ else: # bootstrapping substitute
 when defined(nimHasSymOwnerInMacro):
   proc owner*(sym: NimNode): NimNode {.magic: "SymOwner", noSideEffect.}
     ## accepts node of kind nnkSym and returns its owner's symbol.
-    ## result is also mnde of kind nnkSym if owner exists otherwise 
+    ## result is also mnde of kind nnkSym if owner exists otherwise
     ## nnkNilLit is returned
 
 proc getType*(n: NimNode): NimNode {.magic: "NGetType", noSideEffect.}
@@ -977,7 +977,7 @@ proc newIfStmt*(branches: varargs[tuple[cond, body: NimNode]]):
   ##
   result = newNimNode(nnkIfStmt)
   for i in branches:
-    result.add(newNimNode(nnkElifBranch).add(i.cond, i.body))
+    result.add(newTree(nnkElifBranch, i.cond, i.body))
 
 proc newEnum*(name: NimNode, fields: openArray[NimNode],
               public, pure: bool): NimNode {.compileTime.} =