summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-01-25 10:29:27 -0800
committerKaz Kylheku <kaz@kylheku.com>2017-01-25 10:29:27 -0800
commit41ea4bd2c8791696525aadb0a457ba36fa1d204e (patch)
tree8d006ed8212c8911d5542cb75808a5c5e26dafd3 /tests
parent12454b0e43160c851e20614ce888d33c2f8d9b16 (diff)
downloadtxr-41ea4bd2c8791696525aadb0a457ba36fa1d204e.tar.gz
txr-41ea4bd2c8791696525aadb0a457ba36fa1d204e.tar.bz2
txr-41ea4bd2c8791696525aadb0a457ba36fa1d204e.zip
New catch*, giving access to exception symbol.
* eval.c (op_catch): The sys:catch operator now passes the exception symbol as the first argument of each clause. This means the catch macro must be adjusted. * share/txr/stdlib/except.tl (catch): Macro now inserts a gensym dummy first argument into each clause to take the symbol passed by the sys:catch operator. (catch*): New macro, which is identical to the previous catch macro, and thus exposes the symbol passed as the first argument. * txr.1: Documented catch*. * tests/012/struct.tl: Some gensym numbers need adjusting in one test case.
Diffstat (limited to 'tests')
-rw-r--r--tests/012/struct.tl24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/012/struct.tl b/tests/012/struct.tl
index a22d32d0..7b0b7fd8 100644
--- a/tests/012/struct.tl
+++ b/tests/012/struct.tl
@@ -64,20 +64,20 @@
(stest (sys:expand '(defstruct (boa x y) nil
(x 0) (y 0)))
"(sys:make-struct-type 'boa '() '()\n \
- \ '(x y) () (lambda (#:g0004)\n \
- \ (let ((#:g0005 (struct-type #:g0004)))\n \
- \ (if (static-slot-p #:g0005 'x)\n \
- \ () (slotset #:g0004 'x\n \
+ \ '(x y) () (lambda (#:g0008)\n \
+ \ (let ((#:g0009 (struct-type #:g0008)))\n \
+ \ (if (static-slot-p #:g0009 'x)\n \
+ \ () (slotset #:g0008 'x\n \
\ 0))\n \
- \ (if (static-slot-p #:g0005 'y)\n \
- \ () (slotset #:g0004 'y\n \
+ \ (if (static-slot-p #:g0009 'y)\n \
+ \ () (slotset #:g0008 'y\n \
\ 0))))\n \
- \ (lambda (#:g0004 #:g0006\n \
- \ #:g0007)\n \
- \ (slotset #:g0004 'x\n \
- \ #:g0006)\n \
- \ (slotset #:g0004 'y\n \
- \ #:g0007))\n \
+ \ (lambda (#:g0008 #:g0010\n \
+ \ #:g0011)\n \
+ \ (slotset #:g0008 'x\n \
+ \ #:g0010)\n \
+ \ (slotset #:g0008 'y\n \
+ \ #:g0011))\n \
\ ())")
(defstruct (boa x y) nil