From 6e46dd1b0d81087a541656c61eb798ba35a01c06 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Wed, 12 Jun 2019 11:29:40 +0200 Subject: [PATCH] syntax/parse: fix saving of eh-alternatives Avoid adding extra syntax wrapping. This doesn't matter for parsing, but it does matter for pattern analyses. --- .../collects/syntax/parse/private/parse.rkt | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/racket/collects/syntax/parse/private/parse.rkt b/racket/collects/syntax/parse/private/parse.rkt index e0310184cd..4382f4a681 100644 --- a/racket/collects/syntax/parse/private/parse.rkt +++ b/racket/collects/syntax/parse/private/parse.rkt @@ -1214,26 +1214,7 @@ Conventions: [(alt-expr ...) (for/list ([alt (in-list eh-alts)]) (with-syntax ([repc-expr - ;; repc structs are prefab; recreate using prefab - ;; quasiquote exprs to avoid moving constructors - ;; to residual module - (syntax-case (eh-alternative-repc alt) () - [#f - #''#f] - [#s(rep:once n u o) - #'`#s(rep:once ,(quote-syntax n) - ,(quote-syntax u) - ,(quote-syntax o))] - [#s(rep:optional n o d) - #'`#s(rep:optional ,(quote-syntax n) - ,(quote-syntax o) - ,(quote-syntax d))] - [#s(rep:bounds min max n u o) - #'`#s(rep:bounds ,(quote min) - ,(quote max) - ,(quote-syntax n) - ,(quote-syntax u) - ,(quote-syntax o))])] + (datum->expression (eh-alternative-repc alt))] [attrs-expr #`(quote #,(eh-alternative-attrs alt))] [parser-expr