www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 6f663028cba42af3106ce75cd0aeefb2363b069c
parent 8f4ae46c6ef48521747dca81c0811a347584200b
Author: Georges Dupéron <georges.duperon@gmail.com>
Date:   Thu, 17 May 2018 02:28:45 +0200

Compatibility with Racket 7: the syntax? field of attribute-mapping is now called check, and holds a different value.

Diffstat:
Muntyped-only/syntax-parse.rkt | 16++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/untyped-only/syntax-parse.rkt b/untyped-only/syntax-parse.rkt @@ -9,14 +9,22 @@ (version-case [(version< (version) "6.90.0.24") - (require (prefix-in - syntax/parse/private/residual))] + (require (prefix-in - syntax/parse/private/residual)) + (define-for-syntax (compatibility-syntax-or-check syntax?) + syntax?)] [else (require (rename-in (prefix-in - racket/private/template) - [-attribute-mapping -make-attribute-mapping])) + [-attribute-mapping -make-attribute-mapping]) + (only-in syntax/parse/private/residual ;; must be an absolute path + check-attr-value)) (define-for-syntax (-attribute-mapping-syntax? x) ;; attribute-mapping-check is actually false when attribute-mapping-syntax? ;; would have been true (thanks rmculpepper !) - (not (-attribute-mapping-check x)))]) + (not (-attribute-mapping-check x))) + (define-for-syntax (compatibility-syntax-or-check syntax?) + (if syntax? + #f + (quote-syntax check-attr-value)))]) (provide attribute* (for-syntax attribute-info) @@ -90,7 +98,7 @@ (-make-attribute-mapping (quote-syntax valvar) 'name 'depth - 'syntax?)) + (compatibility-syntax-or-check 'syntax?))) (define-syntax name (make-syntax-mapping 'depth (quote-syntax tmp-attr)))))