Fixed dset operator.
h3rald h3rald@h3rald.com
Sun, 06 Nov 2016 15:15:45 +0100
2 files changed,
5 insertions(+),
6 deletions(-)
M
lib/min_lang.nim
→
lib/min_lang.nim
@@ -56,8 +56,10 @@ if v.qVal[0].getString == s.getString:
found = true break if found: - q.qVal.delete(c) - q.qVal.insert(@[s.getString.newSym, m].newVal(i.scope), c) + q.qVal.delete(c) + q.qVal.insert(@[s.getString.newSym, m].newVal(i.scope), c) + else: + q.qVal.add(@[s.getString.newSym, m].newVal(i.scope)) return q proc keys*(i: In, q: MinValue): MinValue =@@ -803,9 +805,6 @@ i.push("quote".newSym)
.symbol("->") do (i: In): i.push("unquote".newSym) - - #.symbol("=>") do (i: In): - # i.push("scope".newSym) .symbol("=~") do (i: In): i.push("regex".newSym)
M
tests/lang.min
→
tests/lang.min
@@ -157,7 +157,7 @@ (((a 1)(b 2)(c 3)) dictionary?) assert
(((a 1)(b 2)(c 3)) 'b dget 2 ==) assert - (((a 1)(b 2)(c 3)) ' :dict dict 5 'b dset ' :newdict newdict ((a 1)(b 5)(c 3)) == dict ((a 1)(b 2)(c 3)) == and) assert + (((a 1)(b 2)(c 3)) ' :dict dict 5 'b dset 7 'd dset ' :newdict newdict ((a 1)(b 5)(c 3)(d 7)) == dict ((a 1)(b 2)(c 3)) == and) assert (((a 1)(b 2)(c 3)) ' :dict dict 'b ddel ' :newdict newdict ((a 1)(c 3)) == dict ((a 1)(b 2)(c 3)) == and) assert