diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-05-08 17:18:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-08 17:18:46 +0200 |
commit | 61380d0a070a4a691e820e18b25e9dd8fb420306 (patch) | |
tree | a786b6ba0f9e831fecfb75de2a5c3d097a24a962 /compiler/suggest.nim | |
parent | 8180d443b9938f135dd280bcd5e1727766cd7468 (diff) | |
parent | cc28eef38e601171644ffe1a2775744eaaca8123 (diff) | |
download | Nim-61380d0a070a4a691e820e18b25e9dd8fb420306.tar.gz |
Small cleanup (#11185)
* Remove mStaticTy and mTypeTy * Replace countup(x, y-1) with x ..< y * Replace countup(x, y) with x .. y
Diffstat (limited to 'compiler/suggest.nim')
-rw-r--r-- | compiler/suggest.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/suggest.nim b/compiler/suggest.nim index 16f9b4d65..6ae7c216f 100644 --- a/compiler/suggest.nim +++ b/compiler/suggest.nim @@ -275,7 +275,7 @@ template wholeSymTab(cond, section: untyped) = pm, c.inTypeContext > 0, scopeN)) proc suggestSymList(c: PContext, list, f: PNode; info: TLineInfo, outputs: var Suggestions) = - for i in countup(0, sonsLen(list) - 1): + for i in 0 ..< sonsLen(list): if list.sons[i].kind == nkSym: suggestField(c, list.sons[i].sym, f, info, outputs) #else: InternalError(list.info, "getSymFromList") @@ -283,12 +283,12 @@ proc suggestSymList(c: PContext, list, f: PNode; info: TLineInfo, outputs: var S proc suggestObject(c: PContext, n, f: PNode; info: TLineInfo, outputs: var Suggestions) = case n.kind of nkRecList: - for i in countup(0, sonsLen(n)-1): suggestObject(c, n.sons[i], f, info, outputs) + for i in 0 ..< sonsLen(n): suggestObject(c, n.sons[i], f, info, outputs) of nkRecCase: var L = sonsLen(n) if L > 0: suggestObject(c, n.sons[0], f, info, outputs) - for i in countup(1, L-1): suggestObject(c, lastSon(n.sons[i]), f, info, outputs) + for i in 1 ..< L: suggestObject(c, lastSon(n.sons[i]), f, info, outputs) of nkSym: suggestField(c, n.sym, f, info, outputs) else: discard |