Replace countup(x, y) with x .. y

This commit is contained in:
Clyybber 2019-05-07 12:37:28 +02:00
commit cc28eef38e
35 changed files with 103 additions and 103 deletions

View file

@ -984,7 +984,7 @@ proc lookupInRecordAndBuildCheck(c: PContext, n, r: PNode, field: PIdent,
check = newNodeI(nkCheckedFieldExpr, n.info)
addSon(check, c.graph.emptyNode) # make space for access node
s = newNodeIT(nkCurly, n.info, setType)
for j in countup(0, sonsLen(it) - 2): addSon(s, copyTree(it.sons[j]))
for j in 0 .. sonsLen(it) - 2: addSon(s, copyTree(it.sons[j]))
var inExpr = newNodeIT(nkCall, n.info, getSysType(c.graph, n.info, tyBool))
addSon(inExpr, newSymNode(c.graph.opContains, n.info))
addSon(inExpr, s)
@ -1046,7 +1046,7 @@ proc readTypeParameter(c: PContext, typ: PType,
let ty = if typ.kind == tyCompositeTypeClass: typ.sons[1].skipGenericAlias
else: typ.skipGenericAlias
let tbody = ty.sons[0]
for s in countup(0, tbody.len-2):
for s in 0 .. tbody.len-2:
let tParam = tbody.sons[s]
if tParam.sym.name.id == paramName.id:
let rawTyp = ty.sons[s + 1]