Fix temporaries breaking (let ...) blocks, (gensym)
This commit is contained in:
@@ -1 +0,0 @@
|
||||
(print (explain explain))
|
||||
+16
-6
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user