diff --git a/main.rkt b/main.rkt index 5aa415a..f8f976a 100644 --- a/main.rkt +++ b/main.rkt @@ -6,6 +6,7 @@ "private/post.rkt" "private/global.rkt" "private/optional.rkt" + "private/mixin.rkt" (for-template "private/define-syntax+simple-api.rkt")) (provide #;define-splicing-syntax-class-with-eh-mixins @@ -14,6 +15,7 @@ (expander-out eh-mixin) ~seq-no-order ~no-order + ~mixin ~post-check ~post-fail ~nop diff --git a/private/define-syntax+simple-api.rkt b/private/define-syntax+simple-api.rkt index c4f9d8e..23bdffd 100644 --- a/private/define-syntax+simple-api.rkt +++ b/private/define-syntax+simple-api.rkt @@ -63,7 +63,7 @@ (define (name stx2) (syntax-parameterize ([stx (make-rename-transformer #'stx2)]) (syntax-parse stx2 - [(name . colon-stxclass) . body]))) + [(_ . colon-stxclass) . body]))) (define (private-simple-api stx/arg attr-name/arg …) (syntax-parameterize ([stx (make-rename-transformer #'stx/arg)]) (syntax-parse #'nothing diff --git a/private/mixin.rkt b/private/mixin.rkt new file mode 100644 index 0000000..2c2f312 --- /dev/null +++ b/private/mixin.rkt @@ -0,0 +1,11 @@ +#lang racket + +(require "no-order.rkt" + (for-syntax syntax/parse)) + +(provide ~mixin) + +(define-eh-mixin-expander ~mixin + (syntax-parser + [(_ (~var mixin (static eh-mixin-expander? "an eh-mixin expander"))) + #'(mixin)])) \ No newline at end of file diff --git a/test/test-structure-options.rkt b/test/test-structure-options.rkt index 9547e08..6f351e8 100644 --- a/test/test-structure-options.rkt +++ b/test/test-structure-options.rkt @@ -73,11 +73,11 @@ {structure-kw-predicate-mixin} {structure-kw-fields-mixin}})) -;; --------- - (define-splicing-syntax-class structure-kws (pattern {~seq-no-order {structure-kw-all-mixin}})) +;; --------- + (check-equal? (syntax-parse #'(#:instance #:? p) [(:structure-kws) (list* (attribute instance) @@ -163,4 +163,4 @@ builder-style field declarations" ;; body])) ;; ;; For speed, we could just copy the whole implementation in real-macro-name's -;; definition, instead of calling simplified-macro-implementation. \ No newline at end of file +;; definition, instead of calling simplified-macro-implementation.