mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 09:54:49 +00:00
Merge branch 'macro-items' of https://github.com/transfuturist/Nim into transfuturist-macro-items
This commit is contained in:
@@ -719,10 +719,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.}=
|
||||
iterator items*(n: NimNode): NimNode {.inline.} =
|
||||
for i in 0 ..< n.len:
|
||||
yield n[i]
|
||||
|
||||
iterator children*(n: NimNode): NimNode {.inline.} = items
|
||||
|
||||
template findChild*(n: NimNode; cond: expr): NimNode {.
|
||||
immediate, dirty.} =
|
||||
## Find the first child node matching condition (or nil).
|
||||
|
||||
Reference in New Issue
Block a user