syntax/parse: fix ellipsis "optimization" for null tail pattern
The transformation also has the effect of making ellipsis patterns with nullable heads, such as ((~seq x:sc ...) ...), terminate rather than looping forever. To do: add null eh match check and error.
This commit is contained in:
parent
2109b26c15
commit
c9074c26dc
|
@ -945,7 +945,7 @@ Conventions:
|
|||
[(a ...) attrs]
|
||||
[(attr-repc ...) attr-repcs]
|
||||
[tail-pattern-is-null?
|
||||
(equal? (syntax->datum #'tail) '#s(pat:datum () ()))])
|
||||
(equal? (syntax->datum #'tail) '#s(pat:datum ()))])
|
||||
(define/with-syntax alt-map #'((id . alt-id) ...))
|
||||
(define/with-syntax loop-k
|
||||
#'(dots-loop dx* dcx* loop-pr* fail-handler rel-rep ... alt-id ...))
|
||||
|
|
Loading…
Reference in New Issue
Block a user