From b9c1dd007279876f2f1d8a4085ffbfb0c9a27bb3 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Mon, 3 Aug 2015 18:42:02 +0100 Subject: [PATCH] Fixed macros.nim not compiling. Iterator aliases are not possible. --- lib/core/macros.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/core/macros.nim b/lib/core/macros.nim index 5d852cdb11..d371a92cfc 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -724,7 +724,10 @@ iterator items*(n: NimNode): NimNode {.inline.} = for i in 0 ..< n.len: yield n[i] -iterator children*(n: NimNode): NimNode {.inline.} = items +iterator children*(n: NimNode): NimNode {.inline.} = + ## Iterates over the children of the NimNode ``n``. + for i in 0 ..< n.len: + yield n[i] template findChild*(n: NimNode; cond: expr): NimNode {. immediate, dirty.} =