From e8e24a4db615fc921b1acdf36f0aeb8dfb614639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Wed, 7 Sep 2016 16:03:46 +0200 Subject: [PATCH] Renamed ~whole to ~named-seq --- main.rkt | 2 +- private/post.rkt | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/main.rkt b/main.rkt index f4264c7..ba702e0 100644 --- a/main.rkt +++ b/main.rkt @@ -18,7 +18,7 @@ ~mixin ~post-check ~post-fail - ~whole + ~named-seq ~nop ~optional/else ~global-or diff --git a/private/post.rkt b/private/post.rkt index f62335e..9684b96 100644 --- a/private/post.rkt +++ b/private/post.rkt @@ -11,7 +11,7 @@ (provide ~nop ~post-check ~post-fail - ~whole) + ~named-seq) (define-syntax ~nop (pattern-expander @@ -38,14 +38,15 @@ ...)) #'(~and (~bind [clause-present #t]) . pats))]))) -(define-eh-mixin-expander ~whole +(define-eh-mixin-expander ~named-seq (λ (stx) (syntax-case stx () [(_ id . pats) + (identifier? #'id) (let () (define/with-syntax clause-present (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) (attribute clause) (list))]))