summary refs log tree commit diff stats
path: root/lib/core/macros.nim
diff options
context:
space:
mode:
authortransfuturist <timothy.schmid@gmail.com>2015-05-17 15:05:26 -0700
committertransfuturist <timothy.schmid@gmail.com>2015-05-17 15:05:26 -0700
commitbc2aaea853d3bd1ad7641bf32335e3725f03afed (patch)
tree42846a66daefcb5ca87813af5cf6aedb29fb93c1 /lib/core/macros.nim
parent3d80fcb8c6ff1e03922f517681efad65d79563fb (diff)
downloadNim-bc2aaea853d3bd1ad7641bf32335e3725f03afed.tar.gz
Change check for NimNode items to node kind
Diffstat (limited to 'lib/core/macros.nim')
-rw-r--r--lib/core/macros.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/core/macros.nim b/lib/core/macros.nim
index 41998250e..0bfdffc5d 100644
--- a/lib/core/macros.nim
+++ b/lib/core/macros.nim
@@ -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]