Fixed SIGSEGV with tap and tap! operators.
h3rald h3rald@h3rald.com
Sun, 06 Aug 2017 15:52:04 +0200
2 files changed,
15 insertions(+),
3 deletions(-)
M
core/interpreter.nim
→
core/interpreter.nim
@@ -111,9 +111,12 @@ else:
i.push(op.val) proc dequote*(i: In, q: var MinValue) = - i.withScope(q, q.scope): - for v in q.qVal: - i.push v + if not q.isQuotation: + i.push(q) + else: + i.withScope(q, q.scope): + for v in q.qVal: + i.push v proc apply*(i: In, q: var MinValue) = var i2 = newMinInterpreter("<apply>")
M
tests/lang.min
→
tests/lang.min
@@ -183,6 +183,15 @@ (("a" 3) ("b" 3) ("c" 3)) ==
) assert ( + () =data + data ( + 1 %a + 2 %b + ) tap + (("a" 1) ("b" 2)) == + ) assert + + ( "" :s1 "test" ( (' "1" swap append "" join)