mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-20 06:09:18 +02:00
non-standard extension - allowing empty expressions in case clauses
This commit is contained in:
parent
34c1b86137
commit
e7dbddadef
1 changed files with 7 additions and 3 deletions
|
@ -271,9 +271,13 @@
|
|||
(er-macro-transformer
|
||||
(lambda (expr rename compare)
|
||||
(define (body exprs)
|
||||
(if (compare (rename '=>) (car exprs))
|
||||
`(,(cadr exprs) ,(rename 'tmp))
|
||||
`(,(rename 'begin) ,@exprs)))
|
||||
(cond
|
||||
((null? exprs)
|
||||
(rename 'tmp))
|
||||
((compare (rename '=>) (car exprs))
|
||||
`(,(cadr exprs) ,(rename 'tmp)))
|
||||
(else
|
||||
`(,(rename 'begin) ,@exprs))))
|
||||
(define (clause ls)
|
||||
(cond
|
||||
((null? ls) #f)
|
||||
|
|
Loading…
Add table
Reference in a new issue