Renamed ~whole to ~named-seq
This commit is contained in:
parent
32a7685908
commit
e8e24a4db6
2
main.rkt
2
main.rkt
|
@ -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
|
||||||
|
|
|
@ -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))]))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user