add syntax locations to cond* macro
svn: r14868
This commit is contained in:
parent
676f827ab0
commit
f712495009
|
@ -17,10 +17,11 @@
|
|||
(define-syntax (cond* stx)
|
||||
(syntax-case stx (else)
|
||||
[(_ [pred expr id rhs] . rest)
|
||||
#'(let ([id expr])
|
||||
(if (pred id)
|
||||
rhs
|
||||
(cond . rest)))]
|
||||
(quasisyntax/loc stx
|
||||
(let ([id expr])
|
||||
(if (pred id)
|
||||
rhs
|
||||
#,(syntax/loc #'rest (cond . rest)))))]
|
||||
[(_ [else . rest]) #'(begin . rest)]
|
||||
[(_ [p . rhs] . rest)
|
||||
#'(if p (begin . rhs)
|
||||
|
|
Loading…
Reference in New Issue
Block a user