Fix for 6.4 and 6.5 where with-disappeared-uses does not allow multiple body statements.
This commit is contained in:
parent
6475b89bc8
commit
468495937c
|
@ -33,6 +33,7 @@
|
||||||
#:with colon-stxclass (format-id #'cls ":~a" #'cls)
|
#:with colon-stxclass (format-id #'cls ":~a" #'cls)
|
||||||
#:with name-forward (format-id #'name "~a-forward-attributes" #'name)
|
#:with name-forward (format-id #'name "~a-forward-attributes" #'name)
|
||||||
(with-disappeared-uses
|
(with-disappeared-uses
|
||||||
|
(let ()
|
||||||
(define c (syntax-local-value/record #'cls syntax/parse:stxclass?))
|
(define c (syntax-local-value/record #'cls syntax/parse:stxclass?))
|
||||||
(define attrs (syntax/parse:stxclass-attrs c))
|
(define attrs (syntax/parse:stxclass-attrs c))
|
||||||
(define/with-syntax (attr-name …) (map syntax/parse:attr-name attrs))
|
(define/with-syntax (attr-name …) (map syntax/parse:attr-name attrs))
|
||||||
|
@ -40,7 +41,8 @@
|
||||||
(stx-map (λ (a) (datum->syntax #'body (syntax-e a)))
|
(stx-map (λ (a) (datum->syntax #'body (syntax-e a)))
|
||||||
#'(attr-name …)))
|
#'(attr-name …)))
|
||||||
(define-temp-ids "~a/arg" (attr-name …))
|
(define-temp-ids "~a/arg" (attr-name …))
|
||||||
(define/with-syntax (attr-depth …) (map syntax/parse:attr-depth attrs))
|
(define/with-syntax (attr-depth …)
|
||||||
|
(map syntax/parse:attr-depth attrs))
|
||||||
#'(begin
|
#'(begin
|
||||||
(define (name stx2)
|
(define (name stx2)
|
||||||
(syntax-parameterize ([stx (make-rename-transformer #'stx2)])
|
(syntax-parameterize ([stx (make-rename-transformer #'stx2)])
|
||||||
|
@ -64,4 +66,4 @@
|
||||||
(attribute #,(format-id stx3 "~a.~a"
|
(attribute #,(format-id stx3 "~a.~a"
|
||||||
#'forward-args-prefix
|
#'forward-args-prefix
|
||||||
'attr-name))
|
'attr-name))
|
||||||
…)]))))])))
|
…)])))))])))
|
Loading…
Reference in New Issue
Block a user