This commit is contained in:
Araq 2014-12-25 17:22:41 +01:00
commit 9280473eb1
11 changed files with 34 additions and 39 deletions

View file

@ -1560,3 +1560,9 @@ 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}
proc makeStmtList*(n: PNode): PNode =
if n.kind == nkStmtList:
result = n
else:
result = newNodeI(nkStmtList, n.info)
result.add n