made disjoint checker smarter; fixes regressions
This commit is contained in:
parent
ac3cc140f5
commit
90d1ad4231
3 changed files with 43 additions and 14 deletions
|
|
@ -1588,6 +1588,14 @@ proc makeStmtList*(n: PNode): PNode =
|
|||
result = newNodeI(nkStmtList, n.info)
|
||||
result.add n
|
||||
|
||||
proc skipStmtList*(n: PNode): PNode =
|
||||
if n.kind in {nkStmtList, nkStmtListExpr}:
|
||||
for i in 0 .. n.len-2:
|
||||
if n[i].kind notin {nkEmpty, nkCommentStmt}: return n
|
||||
result = n.lastSon
|
||||
else:
|
||||
result = n
|
||||
|
||||
proc createMagic*(name: string, m: TMagic): PSym =
|
||||
result = newSym(skProc, getIdent(name), nil, unknownLineInfo())
|
||||
result.magic = m
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue