move #:alignment option for `define-cstruct' to end
to make it consistent with options for `struct' and `define-struct'
This commit is contained in:
parent
5a833ffc57
commit
17cdb9eb3b
|
@ -1354,7 +1354,7 @@
|
||||||
(and (_-identifier? #'_TYPE stx)
|
(and (_-identifier? #'_TYPE stx)
|
||||||
(identifiers? #'(slot ...)))
|
(identifiers? #'(slot ...)))
|
||||||
(make-syntax #'_TYPE #f #'(slot ...) #'(slot-type ...) #'#f)]
|
(make-syntax #'_TYPE #f #'(slot ...) #'(slot-type ...) #'#f)]
|
||||||
[(_ _TYPE #:alignment alignment-expr ([slot slot-type] ...))
|
[(_ _TYPE ([slot slot-type] ...) #:alignment alignment-expr)
|
||||||
(and (_-identifier? #'_TYPE stx)
|
(and (_-identifier? #'_TYPE stx)
|
||||||
(identifiers? #'(slot ...)))
|
(identifiers? #'(slot ...)))
|
||||||
(make-syntax #'_TYPE #f #'(slot ...) #'(slot-type ...) #'alignment-expr)]
|
(make-syntax #'_TYPE #f #'(slot ...) #'(slot-type ...) #'alignment-expr)]
|
||||||
|
@ -1362,7 +1362,7 @@
|
||||||
(and (_-identifier? #'_TYPE stx) (identifiers? #'(slot ...)))
|
(and (_-identifier? #'_TYPE stx) (identifiers? #'(slot ...)))
|
||||||
(with-syntax ([super (datum->syntax #'_TYPE 'super #'_TYPE)])
|
(with-syntax ([super (datum->syntax #'_TYPE 'super #'_TYPE)])
|
||||||
(make-syntax #'_TYPE #t #'(super slot ...) #'(_SUPER slot-type ...) #'#f))]
|
(make-syntax #'_TYPE #t #'(super slot ...) #'(_SUPER slot-type ...) #'#f))]
|
||||||
[(_ (_TYPE _SUPER) #:alignment alignment-expr ([slot slot-type] ...))
|
[(_ (_TYPE _SUPER) ([slot slot-type] ...) #:alignment alignment-expr)
|
||||||
(and (_-identifier? #'_TYPE stx) (identifiers? #'(slot ...)))
|
(and (_-identifier? #'_TYPE stx) (identifiers? #'(slot ...)))
|
||||||
(with-syntax ([super (datum->syntax #'_TYPE 'super #'_TYPE)])
|
(with-syntax ([super (datum->syntax #'_TYPE 'super #'_TYPE)])
|
||||||
(make-syntax #'_TYPE #t #'(super slot ...) #'(_SUPER slot-type ...) #'alignment-expr))]))
|
(make-syntax #'_TYPE #t #'(super slot ...) #'(_SUPER slot-type ...) #'alignment-expr))]))
|
||||||
|
|
|
@ -776,7 +776,7 @@ the allocated space, so it is inefficient. Use @scheme[define-cstruct]
|
||||||
below for a more efficient approach.}
|
below for a more efficient approach.}
|
||||||
|
|
||||||
|
|
||||||
@defform/subs[(define-cstruct id/sup alignment ([field-id type-expr] ...))
|
@defform/subs[(define-cstruct id/sup ([field-id type-expr] ...) alignment)
|
||||||
[(id/sup _id
|
[(id/sup _id
|
||||||
(_id super-id))
|
(_id super-id))
|
||||||
(alignment code:blank
|
(alignment code:blank
|
||||||
|
|
Loading…
Reference in New Issue
Block a user