From 7500eed0cfb56a1fc4812d57ac301ee9b7f50026 Mon Sep 17 00:00:00 2001 From: transfuturist Date: Sat, 16 May 2015 17:26:47 -0700 Subject: [PATCH] Better solution: deprecation --- lib/core/macros.nim | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/core/macros.nim b/lib/core/macros.nim index becfd2d94..48e4566b3 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -708,14 +708,12 @@ proc `$`*(node: NimNode): string {.compileTime.} = proc ident*(name: string): NimNode {.compileTime,inline.} = newIdentNode(name) ## Create a new ident node from a string -iterator children*(n: NimNode): NimNode {.inline.}= - for i in 0 .. high(n): - yield n[i] - iterator items*(n: NimNode): NimNode {.inline.}= for i in 0 .. high(n): yield n[i] +{.deprecated: [children: items].} + template findChild*(n: NimNode; cond: expr): NimNode {. immediate, dirty.} = ## Find the first child node matching condition (or nil).