fix bug in the handling of side-conditions

This commit is contained in:
Robby Findler 2011-12-04 08:13:45 -06:00
parent 8b3fae79c2
commit f725066bf9
2 changed files with 8 additions and 1 deletions

View File

@ -44,7 +44,7 @@
(extract-names all-nts what bind-names? orig-stx)
(let loop ([term orig-stx])
(syntax-case term (side-condition variable-except variable-prefix hole name in-hole hide-hole cross unquote)
(syntax-case term (side-condition variable-except variable-prefix hole name in-hole hide-hole cross unquote and)
[(side-condition pre-pat (and))
;; rewriting metafunctions (and possibly other things) that have no where, etc clauses
;; end up with side-conditions that are empty 'and' expressions, so we just toss them here.

View File

@ -2486,6 +2486,13 @@
(where any_y x)))
'x)
'(x1))
(test (let ([not-and
(λ () #f)])
(redex-match empty-language
(side-condition any_1 (not-and))
1))
#f)
(let ()
;; tests where's ability to have redex patterns, not just syntax-case patterns