mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-31 18:32:11 +00:00
Change check for NimNode items to node kind
This commit is contained in:
@@ -709,7 +709,7 @@ proc ident*(name: string): NimNode {.compileTime,inline.} = newIdentNode(name)
|
||||
## Create a new ident node from a string
|
||||
|
||||
iterator items*(n: NimNode): NimNode {.inline.} =
|
||||
if n[0] != nil:
|
||||
if n.kind in {nnkType, nnkMetaNode .. nnkReturnToken}:
|
||||
for i in 0 .. high(n):
|
||||
yield n[i]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user