Add value check for NimNode items
This commit is contained in:
parent
7500eed0cf
commit
3d80fcb8c6
1 changed files with 4 additions and 3 deletions
|
|
@ -708,9 +708,10 @@ proc `$`*(node: NimNode): string {.compileTime.} =
|
||||||
proc ident*(name: string): NimNode {.compileTime,inline.} = newIdentNode(name)
|
proc ident*(name: string): NimNode {.compileTime,inline.} = newIdentNode(name)
|
||||||
## Create a new ident node from a string
|
## Create a new ident node from a string
|
||||||
|
|
||||||
iterator items*(n: NimNode): NimNode {.inline.}=
|
iterator items*(n: NimNode): NimNode {.inline.} =
|
||||||
for i in 0 .. high(n):
|
if n[0] != nil:
|
||||||
yield n[i]
|
for i in 0 .. high(n):
|
||||||
|
yield n[i]
|
||||||
|
|
||||||
{.deprecated: [children: items].}
|
{.deprecated: [children: items].}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue