summary refs log tree commit diff stats
path: root/compiler/semtempl.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/semtempl.nim
parentf18b3af9d4a6393ba988cdb17d8f0861b1c75c7d (diff)
downloadNim-cc28eef38e601171644ffe1a2775744eaaca8123.tar.gz
Replace countup(x, y) with x .. y
Diffstat (limited to 'compiler/semtempl.nim')
-rw-r--r--compiler/semtempl.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/semtempl.nim b/compiler/semtempl.nim
index 95d4c9855..4b283f793 100644
--- a/compiler/semtempl.nim
+++ b/compiler/semtempl.nim
@@ -298,7 +298,7 @@ proc semTemplSomeDecl(c: var TemplCtx, n: PNode, symKind: TSymKind; start=0) =
     when defined(nimsuggest):
       dec c.c.inTypeContext
     a.sons[L-1] = semTemplBody(c, a.sons[L-1])
-    for j in countup(0, L-3):
+    for j in 0 .. L-3:
       addLocalDecl(c, a.sons[j], symKind)
 
 proc semPattern(c: PContext, n: PNode): PNode
@@ -363,7 +363,7 @@ proc semTemplBody(c: var TemplCtx, n: PNode): PNode =
       var a = n.sons[i]
       checkMinSonsLen(a, 1, c.c.config)
       var L = sonsLen(a)
-      for j in countup(0, L-2):
+      for j in 0 .. L-2:
         a.sons[j] = semTemplBody(c, a.sons[j])
       a.sons[L-1] = semTemplBodyScope(c, a.sons[L-1])
     closeScope(c)
@@ -371,7 +371,7 @@ proc semTemplBody(c: var TemplCtx, n: PNode): PNode =
     var L = sonsLen(n)
     openScope(c)
     n.sons[L-2] = semTemplBody(c, n.sons[L-2])
-    for i in countup(0, L - 3):
+    for i in 0 .. L - 3:
       if n[i].kind == nkVarTuple:
         for j in 0 ..< sonsLen(n[i])-1:
           addLocalDecl(c, n[i][j], skForVar)
@@ -403,7 +403,7 @@ proc semTemplBody(c: var TemplCtx, n: PNode): PNode =
       checkMinSonsLen(a, 1, c.c.config)
       var L = sonsLen(a)
       openScope(c)
-      for j in countup(0, L-2):
+      for j in 0 .. L-2:
         if a.sons[j].isInfixAs():
           addLocalDecl(c, a.sons[j].sons[2], skLet)
           a.sons[j].sons[1] = semTemplBody(c, a.sons[j][1])