Fixed tests (removed include).
h3rald h3rald@h3rald.com
Tue, 18 Oct 2016 19:23:56 +0200
11 files changed,
29 insertions(+),
10 deletions(-)
M
core/interpreter.nim
→
core/interpreter.nim
@@ -2,7 +2,8 @@ import
streams, strutils, critbits, - os + os, + oids import value, parser@@ -50,6 +51,9 @@ if not scope.isNil and scope.symbols.hasKey(key):
if scope.symbols[key].sealed: raiseInvalid("Symbol '$1' is sealed." % key) scope.symbols[key] = value + # TODO remove + #if key == "total": + # echo "[bind] (scope: $1) $2 -> $3" % [scope.fullname, key, $value] result = true else: # Go up the scope chain and attempt to find the symbol@@ -191,7 +195,7 @@ op.prc(i)
of minValOp: if op.val.kind == minQuotation: var q = op.val - i.addScope(name, q): + i.addScope(name & "#" & $genOid(), q): #echo "a1: ", i.scope.fullname for e in q.qVal: i.push e
M
lib/min_lang.nim
→
lib/min_lang.nim
@@ -170,6 +170,9 @@ i.debug "[define] (scope: $1) $2 = $3" % [i.scope.name, symbol, $q1]
if i.scope.symbols.hasKey(symbol) and i.scope.symbols[symbol].sealed: raiseUndefined("Attempting to redefine sealed symbol '$1' on scope '$2'" % [symbol, i.scope.name]) i.newScope("$1#$2" % [symbol, $genOid()], q1) + # TODO remove + #if symbol == "total": + # echo "[define] (scope: $1) $2 -> $3" % [i.scope.fullname, symbol, $q1, $q1.qVal[0]] i.scope.symbols[symbol] = MinOperator(kind: minValOp, val: q1, sealed: false) .symbol("bind") do (i: In):@@ -181,6 +184,9 @@ if not q1.isQuotation:
q1 = @[q1].newVal symbol = sym.getString i.debug "[bind] " & symbol & " = " & $q1 + # TODO remove + #if symbol == "total": + # echo "[bind] (scope: $1) $2 " % [i.scope.fullname, symbol, $q1] #let p = proc (i: In) = # i.push q1.qVal #let res = i.scope.setSymbol(symbol, MinOperator(kind: minProcOp, prc: p))
M
tests/crypto.min
→
tests/crypto.min
@@ -1,4 +1,5 @@
-'test include +'test load +'test import "crypto" describe
M
tests/fs.min
→
tests/fs.min
@@ -1,4 +1,5 @@
-'test include +'test load +'test import "fs" describe
M
tests/io.min
→
tests/io.min
@@ -1,4 +1,5 @@
-'test include +'test load +'test import "io" describe
M
tests/logic.min
→
tests/logic.min
@@ -1,4 +1,5 @@
-'test include +'test load +'test import "logic" describe
M
tests/num.min
→
tests/num.min
@@ -1,4 +1,5 @@
-'test include +'test load +'test import "num" describe
M
tests/str.min
→
tests/str.min
@@ -1,4 +1,5 @@
-'test include +'test load +'test import "str" describe
M
tests/sys.min
→
tests/sys.min
@@ -1,4 +1,5 @@
-'test include +'test load +'test import "sys" describe
M
tests/test.min
→
tests/test.min
@@ -54,6 +54,7 @@ ()
ifte ) map + pop ;Remove results accomulator from stack ) :report ) =test
M
tests/time.min
→
tests/time.min
@@ -1,4 +1,5 @@
-'test include +'test load +'test import "time" describe