Renamed ~whole to ~named-seq

This commit is contained in:
Georges Dupéron 2016-09-07 16:03:46 +02:00
parent 32a7685908
commit e8e24a4db6
2 changed files with 5 additions and 4 deletions

View File

@ -18,7 +18,7 @@
~mixin ~mixin
~post-check ~post-check
~post-fail ~post-fail
~whole ~named-seq
~nop ~nop
~optional/else ~optional/else
~global-or ~global-or

View File

@ -11,7 +11,7 @@
(provide ~nop (provide ~nop
~post-check ~post-check
~post-fail ~post-fail
~whole) ~named-seq)
(define-syntax ~nop (define-syntax ~nop
(pattern-expander (pattern-expander
@ -38,14 +38,15 @@
...)) ...))
#'(~and (~bind [clause-present #t]) . pats))]))) #'(~and (~bind [clause-present #t]) . pats))])))
(define-eh-mixin-expander ~whole (define-eh-mixin-expander ~named-seq
(λ (stx) (λ (stx)
(syntax-case stx () (syntax-case stx ()
[(_ id . pats) [(_ id . pats)
(identifier? #'id)
(let () (let ()
(define/with-syntax clause-present (get-new-clause!)) (define/with-syntax clause-present (get-new-clause!))
(define/with-syntax clause (get-new-clause!)) (define/with-syntax clause (get-new-clause!))
(eh-post-accumulate! '~whole (eh-post-accumulate! '~named-seq
#'(~bind [(id 1) (if (attribute clause-present) #'(~bind [(id 1) (if (attribute clause-present)
(attribute clause) (attribute clause)
(list))])) (list))]))