finicky kitty

pull/13/merge
Matthew Butterick 7 years ago
parent 177dae090f
commit d177a7f06f

@ -149,7 +149,7 @@
(λ (stx) (λ (stx)
(define result (define result
(syntax-parameterize ([caller-stx (make-rename-transformer #'stx)]) (syntax-parameterize ([caller-stx (make-rename-transformer #'stx)])
(syntax-parse (if (syntax? stx) stx (datum->syntax #'here stx)) (syntax-parse (syntax-case stx () [any #'any])
#:literals BOUND-LITS #:literals BOUND-LITS
#:datum-literals UNBOUND-LITS #:datum-literals UNBOUND-LITS
[pat . result-exprs] ... [pat . result-exprs] ...

@ -39,11 +39,10 @@
(define-macro (syntax-parse/easy STX LITS . EXPS) (define-macro (syntax-parse/easy STX LITS . EXPS)
(with-syntax ([(BOUND-LITS UNBOUND-LITS) (generate-bound-and-unbound-literals #'LITS)]) (with-syntax ([(BOUND-LITS UNBOUND-LITS) (generate-bound-and-unbound-literals #'LITS)])
#'(let ([stx STX]) #'(syntax-parse (syntax-case STX () [any #'any])
(syntax-parse (if (syntax? stx) stx (datum->syntax #'here stx)) #:literals BOUND-LITS
#:literals BOUND-LITS #:datum-literals UNBOUND-LITS
#:datum-literals UNBOUND-LITS . EXPS)))
. EXPS))))
(define-macro-cases pattern-case (define-macro-cases pattern-case
[(_ STX-ARG [(_ STX-ARG

Loading…
Cancel
Save