split the inline and closure iterators into different symbol kinds for easier discrimination between them

This commit is contained in:
Zahary Karadjov 2014-03-06 21:57:35 +02:00
commit 862c0ef83d
26 changed files with 110 additions and 84 deletions

View file

@ -772,6 +772,17 @@ proc implictPragmas*(c: PContext, sym: PSym, n: PNode,
addToLib(lib, sym)
if sym.loc.r == nil: sym.loc.r = toRope(sym.name.s)
proc hasPragma*(n: PNode, pragma: TSpecialWord): bool =
if n == nil or n.sons == nil:
return false
for p in n.sons:
var key = if p.kind == nkExprColonExpr: p[0] else: p
if key.kind == nkIdent and whichKeyword(key.ident) == pragma:
return true
return false
proc pragma(c: PContext, sym: PSym, n: PNode, validPragmas: TSpecialWords) =
if n == nil: return
for i in countup(0, sonsLen(n) - 1):