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))
|
(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)
|
(define-syntaxes (require/typed-legacy require/typed)
|
||||||
(let ()
|
(let ()
|
||||||
(define-syntax-class opt-rename
|
(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 spec #'(orig-nm internal-nm)
|
||||||
#:with 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
|
(define-syntax-class simple-clause
|
||||||
#:attributes (nm ty)
|
#:attributes (nm ty)
|
||||||
(pattern [nm:opt-rename 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
|
(define-syntaxes (require-typed-struct-legacy
|
||||||
require-typed-struct)
|
require-typed-struct)
|
||||||
(let ()
|
(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)
|
(define-splicing-syntax-class (constructor-term legacy struct-name)
|
||||||
(pattern (~seq) #:fail-when legacy #f #:attr name struct-name #:attr extra #f)
|
(pattern (~seq) #:fail-when legacy #f #:attr name struct-name #:attr extra #f)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user