Make opt-parent shared across different uses.
This commit is contained in:
parent
f8f989e8c6
commit
a56b1f11fd
|
@ -79,6 +79,13 @@ This file defines two sorts of primitives. All of them are provided into any mod
|
|||
|
||||
(define-for-syntax (ignore stx) (ignore-property stx #t))
|
||||
|
||||
(begin-for-syntax
|
||||
(define-syntax-class opt-parent
|
||||
#:attributes (nm parent)
|
||||
(pattern nm:id #:with parent #'#f)
|
||||
(pattern (nm:id parent:id))))
|
||||
|
||||
|
||||
(define-syntaxes (require/typed-legacy require/typed)
|
||||
(let ()
|
||||
(define-syntax-class opt-rename
|
||||
|
@ -89,12 +96,6 @@ This file defines two sorts of primitives. All of them are provided into any mod
|
|||
#:with spec #'(orig-nm internal-nm)
|
||||
#:with nm #'internal-nm))
|
||||
|
||||
(define-syntax-class opt-parent
|
||||
#:attributes (nm parent)
|
||||
(pattern nm:id
|
||||
#:with parent #'#f)
|
||||
(pattern (nm:id parent:id)))
|
||||
|
||||
(define-syntax-class simple-clause
|
||||
#:attributes (nm ty)
|
||||
(pattern [nm:opt-rename ty]))
|
||||
|
@ -670,9 +671,6 @@ This file defines two sorts of primitives. All of them are provided into any mod
|
|||
(define-syntaxes (require-typed-struct-legacy
|
||||
require-typed-struct)
|
||||
(let ()
|
||||
(define-syntax-class opt-parent
|
||||
(pattern nm:id #:attr parent #'#f)
|
||||
(pattern (nm:id parent:id)))
|
||||
|
||||
(define-splicing-syntax-class (constructor-term legacy struct-name)
|
||||
(pattern (~seq) #:fail-when legacy #f #:attr name struct-name #:attr extra #f)
|
||||
|
|
Loading…
Reference in New Issue
Block a user