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/pragmas.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/pragmas.nim')
-rw-r--r-- | compiler/pragmas.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim index 8a701d7f3..e49461eea 100644 --- a/compiler/pragmas.nim +++ b/compiler/pragmas.nim @@ -104,7 +104,7 @@ proc illegalCustomPragma*(c: PContext, n: PNode, s: PSym) = proc pragmaAsm*(c: PContext, n: PNode): char = result = '\0' if n != nil: - for i in countup(0, sonsLen(n) - 1): + for i in 0 ..< sonsLen(n): let it = n.sons[i] if it.kind in nkPragmaCallKinds and it.len == 2 and it.sons[0].kind == nkIdent: case whichKeyword(it.sons[0].ident) @@ -209,7 +209,7 @@ proc processMagic(c: PContext, n: PNode, s: PSym) = var v: string if n.sons[1].kind == nkIdent: v = n.sons[1].ident.s else: v = expectStrLit(c, n) - for m in countup(low(TMagic), high(TMagic)): + for m in low(TMagic) .. high(TMagic): if substr($m, 1) == v: s.magic = m break @@ -423,7 +423,7 @@ proc processPush(c: PContext, n: PNode, start: int) = x.notes = c.config.notes x.features = c.features c.optionStack.add(x) - for i in countup(start, sonsLen(n) - 1): + for i in start ..< sonsLen(n): if not tryProcessOption(c, n.sons[i], c.config.options): # simply store it somewhere: if x.otherPragmas.isNil: |