fix a broken pattern-expander example (#2197)
pattern expanders shouldn't use `syntax-protect` on their results, and so they shouldn't use `syntax-rules`
This commit is contained in:
parent
a447b5bf6b
commit
759c71e158
|
@ -1151,9 +1151,10 @@ Returns a @tech{pattern expander} that uses @racket[proc] to transform the patte
|
|||
@examples[#:eval the-eval
|
||||
(define-syntax ~maybe
|
||||
(pattern-expander
|
||||
(syntax-rules ()
|
||||
(lambda (stx)
|
||||
(syntax-case stx ()
|
||||
[(~maybe pat ...)
|
||||
(~optional (~seq pat ...))])))
|
||||
#'(~optional (~seq pat ...))]))))
|
||||
]}
|
||||
|
||||
@defthing[prop:pattern-expander (struct-type-property/c (-> pattern-expander? (-> syntax? syntax?)))]{
|
||||
|
|
Loading…
Reference in New Issue
Block a user