prepare Nim codebase for upcoming parser changes

This commit is contained in:
Andreas Rumpf
2016-07-15 12:56:03 +02:00
parent 3e72c98d49
commit 0834cd63d9
26 changed files with 46 additions and 46 deletions

View File

@@ -1668,10 +1668,10 @@ proc genMagicExpr(p: BProc, e: PNode, d: var TLoc, op: TMagic) =
if optOverflowCheck notin p.options: unaryExpr(p, e, d, "($1 - 1)")
else: unaryExpr(p, e, d, "#subInt($1, 1)")
of mInc, mDec:
const opr: array [mInc..mDec, string] = ["$1 += $2;$n", "$1 -= $2;$n"]
const fun64: array [mInc..mDec, string] = ["$# = #addInt64($#, $#);$n",
const opr: array[mInc..mDec, string] = ["$1 += $2;$n", "$1 -= $2;$n"]
const fun64: array[mInc..mDec, string] = ["$# = #addInt64($#, $#);$n",
"$# = #subInt64($#, $#);$n"]
const fun: array [mInc..mDec, string] = ["$# = #addInt($#, $#);$n",
const fun: array[mInc..mDec, string] = ["$# = #addInt($#, $#);$n",
"$# = #subInt($#, $#);$n"]
let underlying = skipTypes(e.sons[1].typ, {tyGenericInst, tyVar, tyRange})
if optOverflowCheck notin p.options or underlying.kind in {tyUInt..tyUInt64}:

View File

@@ -21,7 +21,7 @@ proc toStrMaxPrecision*(f: BiggestFloat): string =
if f > 0.0: result = "INF"
else: result = "-INF"
else:
var buf: array [0..80, char]
var buf: array[0..80, char]
c_sprintf(buf, "%#.16e", f)
result = $buf