semExpr/semStmt merged

This commit is contained in:
Araq 2012-09-13 08:33:55 +02:00
commit 23c3af80f6
6 changed files with 187 additions and 166 deletions

View file

@ -1197,3 +1197,7 @@ iterator items*(n: PNode): PNode =
proc isAtom*(n: PNode): bool {.inline.} =
result = n.kind >= nkNone and n.kind <= nkNilLit
proc isEmptyType*(t: PType): bool {.inline.} =
## 'void' and 'stmt' types are often equivalent to 'nil' these days:
result = t == nil or t.kind in {tyEmpty, tyStmt}