distinguish properly between nkOpen and nkClosedSymChoice

This commit is contained in:
Araq 2012-08-26 02:47:17 +02:00
commit b5b5e6e76d
15 changed files with 107 additions and 50 deletions

View file

@ -143,7 +143,8 @@ proc SwapOperands*(op: PNode) =
proc IsRange*(n: PNode): bool {.inline.} =
if n.kind == nkInfix:
if n[0].kind == nkIdent and n[0].ident.id == ord(wDotDot) or
n[0].kind == nkSymChoice and n[0][1].sym.name.id == ord(wDotDot):
n[0].kind in {nkClosedSymChoice, nkOpenSymChoice} and
n[0][1].sym.name.id == ord(wDotDot):
result = true
proc whichPragma*(n: PNode): TSpecialWord =