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.
This commit is contained in:
parent
4a7717679a
commit
6e46dd1b0d
|
@ -1214,26 +1214,7 @@ Conventions:
|
||||||
[(alt-expr ...)
|
[(alt-expr ...)
|
||||||
(for/list ([alt (in-list eh-alts)])
|
(for/list ([alt (in-list eh-alts)])
|
||||||
(with-syntax ([repc-expr
|
(with-syntax ([repc-expr
|
||||||
;; repc structs are prefab; recreate using prefab
|
(datum->expression (eh-alternative-repc alt))]
|
||||||
;; 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))])]
|
|
||||||
[attrs-expr
|
[attrs-expr
|
||||||
#`(quote #,(eh-alternative-attrs alt))]
|
#`(quote #,(eh-alternative-attrs alt))]
|
||||||
[parser-expr
|
[parser-expr
|
||||||
|
|
Loading…
Reference in New Issue
Block a user