all repos — min @ 62239aac39c3d286770c3bd8514cd11f032ce735

A small but practical concatenative programming language.

Fixed SIGSEGV with tap and tap! operators.
h3rald h3rald@h3rald.com
Sun, 06 Aug 2017 15:52:04 +0200
commit

62239aac39c3d286770c3bd8514cd11f032ce735

parent

ca1797c131a52c9644cb9e5cc99ec634dd6ac112

2 files changed, 15 insertions(+), 3 deletions(-)

jump to
M core/interpreter.nimcore/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.mintests/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)