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:
Ryan Culpepper 2016-05-16 10:23:02 -04:00
parent 2109b26c15
commit c9074c26dc

View File

@ -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 ...))