diff options
Diffstat (limited to 'compiler/importer.nim')
-rw-r--r-- | compiler/importer.nim | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/importer.nim b/compiler/importer.nim index eef0c9bb9..a43818d93 100644 --- a/compiler/importer.nim +++ b/compiler/importer.nim @@ -47,7 +47,7 @@ proc rawImportSymbol(c: PContext, s: PSym) = if s.kind == skType: var etyp = s.typ if etyp.kind in {tyBool, tyEnum}: - for j in countup(0, sonsLen(etyp.n) - 1): + for j in 0 ..< sonsLen(etyp.n): var e = etyp.n.sons[j].sym if e.kind != skEnumField: internalError(c.config, s.info, "rawImportSymbol") @@ -92,7 +92,7 @@ proc importSymbol(c: PContext, n: PNode, fromMod: PSym) = rawImportSymbol(c, e) e = nextIdentIter(it, fromMod.tab) else: rawImportSymbol(c, s) - suggestSym(c.config, n.info, s, c.graph.usageSym, false) + suggestSym(c.config, n.info, s, c.graph.usageSym, false) proc importAllSymbolsExcept(c: PContext, fromMod: PSym, exceptSet: IntSet) = var i: TTabIter @@ -146,7 +146,7 @@ proc myImportModule(c: PContext, n: PNode; importStmtResult: PNode): PSym = #echo "adding ", toFullPath(f), " at ", L+1 if recursion >= 0: var err = "" - for i in countup(recursion, L-1): + for i in recursion ..< L: if i > recursion: err.add "\n" err.add toFullPath(c.config, c.graph.importStack[i]) & " imports " & toFullPath(c.config, c.graph.importStack[i+1]) @@ -189,7 +189,7 @@ proc impMod(c: PContext; it: PNode; importStmtResult: PNode) = proc evalImport*(c: PContext, n: PNode): PNode = result = newNodeI(nkImportStmt, n.info) - for i in countup(0, sonsLen(n) - 1): + for i in 0 ..< sonsLen(n): let it = n.sons[i] if it.kind == nkInfix and it.len == 3 and it[2].kind == nkBracket: let sep = it[0] @@ -219,7 +219,7 @@ proc evalFrom*(c: PContext, n: PNode): PNode = if m != nil: n.sons[0] = newSymNode(m) addDecl(c, m, n.info) # add symbol to symbol table of module - for i in countup(1, sonsLen(n) - 1): + for i in 1 ..< sonsLen(n): if n.sons[i].kind != nkNilLit: importSymbol(c, n.sons[i], m) |