Now supporting BiggestInt and BiggestFloat.
h3rald h3rald@h3rald.com
Sat, 18 Jun 2016 12:16:10 +0200
6 files changed,
8 insertions(+),
8 deletions(-)
M
core/types.nim
→
core/types.nim
@@ -30,8 +30,8 @@ line*: int
column*: int filename*: string case kind*: MinKind - of minInt: intVal*: int - of minFloat: floatVal*: float + of minInt: intVal*: BiggestInt + of minFloat: floatVal*: BiggestFloat of minQuotation: qVal*: seq[MinValue] scope*: ref MinScope
M
core/utils.nim
→
core/utils.nim
@@ -31,10 +31,10 @@
proc newVal*(q: seq[MinValue]): MinValue = return MinValue(kind: minQuotation, qVal: q) -proc newVal*(s: int): MinValue = +proc newVal*(s: BiggestInt): MinValue = return MinValue(kind: minInt, intVal: s) -proc newVal*(s: float): MinValue = +proc newVal*(s: BiggestFloat): MinValue = return MinValue(kind: minFloat, floatVal: s) proc newVal*(s: bool): MinValue =
M
lib/min_lang.nim
→
lib/min_lang.nim
@@ -301,7 +301,7 @@ var index, q: MinValue
i.reqIntAndQuotation index, q if q.qVal.len-1 < index.intVal: raiseOutOfBounds("Insufficient items in quotation") - i.push q.qVal[index.intVal] + i.push q.qVal[index.intVal.int] .symbol("size") do (i: In): var q: MinValue
M
lib/min_net.nim
→
lib/min_net.nim
@@ -109,7 +109,7 @@ var size, q: MinValue
i.reqInt size i.reqObject "socket", q var s = "" - discard q.to(Socket).recv(s, size.intVal) + discard q.to(Socket).recv(s, size.intVal.int) i.push @[q] i.push s.newVal
M
lib/min_num.nim
→
lib/min_num.nim
@@ -56,7 +56,7 @@ var a, b: MinValue
i.reqTwoNumbers a, b if a.isInt: if b.isInt: - i.push newVal(b.intVal / a.intVal) + i.push newVal(b.intVal.int / a.intVal.int) else: i.push newVal(b.floatVal / a.intVal.float) else:
M
lib/min_sys.nim
→
lib/min_sys.nim
@@ -94,6 +94,6 @@
.symbol("sleep") do (i: In): var ms: MinValue i.reqInt ms - sleep ms.intVal + sleep ms.intVal.int .finalize()