summary refs log tree commit diff stats
path: root/lib/core
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-09-12 10:27:54 +0200
committerGitHub <noreply@github.com>2018-09-12 10:27:54 +0200
commit132eb31e32844a6cb312d9d33d62c522772548b9 (patch)
tree1cc31e9d078d6a35e1845a1ee979d6484509cf28 /lib/core
parentb195204549fa99f18fcf1b4d5b757cc5aa7e9a6e (diff)
parentde02f5fa0a667dc252fec58aef2a9d177c3b2de5 (diff)
downloadNim-132eb31e32844a6cb312d9d33d62c522772548b9.tar.gz
Merge pull request #8949 from nim-lang/araq-for-loop-expressions
For loop expressions
Diffstat (limited to 'lib/core')
-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.} =