all repos — min @ 8dd0f90d65a0fb35840dc4e82dab112b7b78cfac

A small but practical concatenative programming language.

Fixed dset operator.
h3rald h3rald@h3rald.com
Sun, 06 Nov 2016 15:15:45 +0100
commit

8dd0f90d65a0fb35840dc4e82dab112b7b78cfac

parent

2b81730eb59b6908b3d4b6099f3248ab23e8d707

2 files changed, 5 insertions(+), 6 deletions(-)

jump to
M lib/min_lang.nimlib/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.mintests/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