Fix temporaries breaking (let ...) blocks, (gensym)

This commit is contained in:
2026-05-22 13:57:35 +03:00
parent 6936966455
commit 3cefd9ac4e
10 changed files with 143 additions and 15 deletions
-1
View File
@@ -1 +0,0 @@
(print (explain explain))
+16 -6
View File
@@ -19,14 +19,16 @@
(assert (= '(2 3 4 2 3 4) `(,@glob1 ,@glob1)))
(assert (= '((((2 3 4)))) `(((,glob1)))))
(defmacro debug (expression)
(print "DEBUG:" expression)
expression
)
; those are prelude, but defined in lysp itself:
(debug
(print "The previously printed expression is AFTER this one in the code")
(compile-debug
(when #t
(print "a")
(print "b")
)
)
(runtime-debug
(when #t
(print "a")
(print "b")
@@ -43,3 +45,11 @@
)
; catch macro
(print "Failing in a catch block...")
(catch
(print a)
e (print "Caught an error:" e)
)
(print "... doesn't fail the execution")