Replace countup(x, y-1) with x ..< y
This commit is contained in:
parent
9ffab44c35
commit
f18b3af9d4
58 changed files with 312 additions and 312 deletions
|
|
@ -45,7 +45,7 @@ proc exprStructuralEquivalent*(a, b: PNode; strictSymEquality=false): bool =
|
|||
of nkEmpty, nkNilLit, nkType: result = true
|
||||
else:
|
||||
if sonsLen(a) == sonsLen(b):
|
||||
for i in countup(0, sonsLen(a) - 1):
|
||||
for i in 0 ..< sonsLen(a):
|
||||
if not exprStructuralEquivalent(a.sons[i], b.sons[i],
|
||||
strictSymEquality): return
|
||||
result = true
|
||||
|
|
@ -69,7 +69,7 @@ proc sameTree*(a, b: PNode): bool =
|
|||
of nkEmpty, nkNilLit, nkType: result = true
|
||||
else:
|
||||
if sonsLen(a) == sonsLen(b):
|
||||
for i in countup(0, sonsLen(a) - 1):
|
||||
for i in 0 ..< sonsLen(a):
|
||||
if not sameTree(a.sons[i], b.sons[i]): return
|
||||
result = true
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ proc whichPragma*(n: PNode): TSpecialWord =
|
|||
if key.kind == nkIdent: result = whichKeyword(key.ident)
|
||||
|
||||
proc effectSpec*(n: PNode, effectType: TSpecialWord): PNode =
|
||||
for i in countup(0, sonsLen(n) - 1):
|
||||
for i in 0 ..< sonsLen(n):
|
||||
var it = n.sons[i]
|
||||
if it.kind == nkExprColonExpr and whichPragma(it) == effectType:
|
||||
result = it.sons[1]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue