www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit d68aa79984c1814a419486b4a6409089e688f1d7
parent 365fed987251528b61419c24047d13c49c9f7191
Author: Georges Dupéron <georges.duperon@gmail.com>
Date:   Sat,  1 Oct 2016 00:16:17 +0200

Fixed ~maybe/empty

Diffstat:
Mprivate/pre.rkt | 33+++++++++++++++++----------------
1 file changed, 17 insertions(+), 16 deletions(-)

diff --git a/private/pre.rkt b/private/pre.rkt @@ -63,18 +63,19 @@ ;; TODO: fixme: should happen before the other pre operations (define-eh-mixin-expander ~maybe/empty - (λ (stx) - (syntax-case stx () - [(_ pat …) - (let () - (define/with-syntax clause-present (get-new-clause!)) - (define/with-syntax (expanded-pat …) - ;; let the ~post, ~global etc. within pat … be recognized - (expand-all-eh-mixin-expanders #'(pat …))) - (eh-first-accumulate! '~maybe/empty - #'(~parse (expanded-pat …) - (if (attribute clause) - #'(clause (... ...)) - #'()))) - #'{~optional {~and {~bind [clause-present #t]} - {~seq clause (... ...)}}})]))) -\ No newline at end of file + (syntax-parser + [(_ {~and pat {~not #:name}} … + {~optional {~seq #:name name}}) + (let () + (define/with-syntax clause-present (get-new-clause!)) + (define/with-syntax (expanded-pat …) + ;; let the ~post, ~global etc. within pat … be recognized + (expand-all-eh-mixin-expanders #'(pat …))) + (eh-first-accumulate! '~maybe/empty + #'(~parse (expanded-pat …) + (if (attribute clause) + #'(clause (... ...)) + #'()))) + #`{~optional {~and {~bind [clause-present #t]} + {~seq clause (... ...)}} + #,@(when-attr name #'(#:name name))})])) +\ No newline at end of file