diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-09-12 10:27:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 10:27:54 +0200 |
commit | 132eb31e32844a6cb312d9d33d62c522772548b9 (patch) | |
tree | 1cc31e9d078d6a35e1845a1ee979d6484509cf28 /lib/core/macros.nim | |
parent | b195204549fa99f18fcf1b4d5b757cc5aa7e9a6e (diff) | |
parent | de02f5fa0a667dc252fec58aef2a9d177c3b2de5 (diff) | |
download | Nim-132eb31e32844a6cb312d9d33d62c522772548b9.tar.gz |
Merge pull request #8949 from nim-lang/araq-for-loop-expressions
For loop expressions
Diffstat (limited to 'lib/core/macros.nim')
-rw-r--r-- | lib/core/macros.nim | 4 |
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.} = |