summary refs log tree commit diff stats
path: root/compiler/transf.nim
diff options
context:
space:
mode:
authorClyybber <darkmine956@gmail.com>2019-05-07 12:37:28 +0200
committerClyybber <darkmine956@gmail.com>2019-05-07 12:37:28 +0200
commitcc28eef38e601171644ffe1a2775744eaaca8123 (patch)
tree720cfdcb95072394a62d365cc18f7b6c71ffe031 /compiler/transf.nim
parentf18b3af9d4a6393ba988cdb17d8f0861b1c75c7d (diff)
downloadNim-cc28eef38e601171644ffe1a2775744eaaca8123.tar.gz
Replace countup(x, y) with x .. y
Diffstat (limited to 'compiler/transf.nim')
-rw-r--r--compiler/transf.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/transf.nim b/compiler/transf.nim
index 634e99c86..0e788b833 100644
--- a/compiler/transf.nim
+++ b/compiler/transf.nim
@@ -203,7 +203,7 @@ proc transformVarSection(c: PTransf, v: PNode): PTransNode =
         internalError(c.graph.config, it.info, "transformVarSection: not nkVarTuple")
       var L = sonsLen(it)
       var defs = newTransNode(it.kind, it.info, L)
-      for j in countup(0, L-3):
+      for j in 0 .. L-3:
         if it[j].kind == nkSym:
           let x = freshVar(c, it.sons[j].sym)
           idNodeTablePut(c.transCon.mapping, it.sons[j].sym, x)
@@ -390,7 +390,7 @@ proc transformYield(c: PTransf, n: PNode): PTransNode =
     else:
       # Unpack the tuple into the loop variables
       # XXX: BUG: what if `n` is an expression with side-effects?
-      for i in countup(0, sonsLen(c.transCon.forStmt) - 3):
+      for i in 0 .. sonsLen(c.transCon.forStmt) - 3:
         let lhs = c.transCon.forStmt.sons[i]
         let rhs = transform(c, newTupleAccess(c.graph, e, i))
         add(result, asgnTo(lhs, rhs))
@@ -620,7 +620,7 @@ proc transformFor(c: PTransf, n: PNode): PTransNode =
   discard c.breakSyms.pop
 
   var v = newNodeI(nkVarSection, n.info)
-  for i in countup(0, length - 3):
+  for i in 0 .. length - 3:
     if n[i].kind == nkVarTuple:
       for j in 0 ..< sonsLen(n[i])-1:
         addVar(v, copyTree(n[i][j])) # declare new vars