diff options
Diffstat (limited to 'tests/011/macros-2.txr')
-rw-r--r-- | tests/011/macros-2.txr | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/tests/011/macros-2.txr b/tests/011/macros-2.txr index debc6eca..a6693c6b 100644 --- a/tests/011/macros-2.txr +++ b/tests/011/macros-2.txr @@ -1,15 +1,16 @@ @(do (set *gensym-counter* 0) - (defmacro whilst ((condition : result) . body) - (let ((cblk (gensym "cnt-blk-")) - (bblk (gensym "brk-blk-"))) - ^(macrolet ((break (value) ^(return-from ,',bblk ,value))) - (symacrolet ((break (return-from ,bblk)) - (continue (return-from ,cblk))) - (block ,bblk - (for () (,condition ,result) () - (block ,cblk ,*body))))))) + (macro-time + (defmacro whilst ((condition : result) . body) + (let ((cblk (gensym "cnt-blk-")) + (bblk (gensym "brk-blk-"))) + ^(macrolet ((break (value) ^(return-from ,',bblk ,value))) + (symacrolet ((break (return-from ,bblk)) + (continue (return-from ,cblk))) + (block ,bblk + (for () (,condition ,result) () + (block ,cblk ,*body)))))))) (let ((i 0)) (whilst ((< i 100)) |