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/idents.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/idents.nim')
-rw-r--r-- | compiler/idents.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/idents.nim b/compiler/idents.nim index 58800b73d..f82ff5db5 100644 --- a/compiler/idents.nim +++ b/compiler/idents.nim @@ -87,7 +87,7 @@ proc getIdent*(ic: IdentCache; identifier: cstring, length: int, h: Hash): PIden new(result) result.h = h result.s = newString(length) - for i in countup(0, length - 1): result.s[i] = identifier[i] + for i in 0 ..< length: result.s[i] = identifier[i] result.next = ic.buckets[idx] ic.buckets[idx] = result if id == 0: @@ -110,7 +110,7 @@ proc newIdentCache*(): IdentCache = result.idDelegator = result.getIdent":delegator" result.emptyIdent = result.getIdent("") # initialize the keywords: - for s in countup(succ(low(specialWords)), high(specialWords)): + for s in succ(low(specialWords)) .. high(specialWords): result.getIdent(specialWords[s], hashIgnoreStyle(specialWords[s])).id = ord(s) proc whichKeyword*(id: PIdent): TSpecialWord = |