fix bug in the handling of side-conditions
This commit is contained in:
parent
8b3fae79c2
commit
f725066bf9
|
@ -44,7 +44,7 @@
|
||||||
(extract-names all-nts what bind-names? orig-stx)
|
(extract-names all-nts what bind-names? orig-stx)
|
||||||
|
|
||||||
(let loop ([term 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))
|
[(side-condition pre-pat (and))
|
||||||
;; rewriting metafunctions (and possibly other things) that have no where, etc clauses
|
;; 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.
|
;; end up with side-conditions that are empty 'and' expressions, so we just toss them here.
|
||||||
|
|
|
@ -2487,6 +2487,13 @@
|
||||||
'x)
|
'x)
|
||||||
'(x1))
|
'(x1))
|
||||||
|
|
||||||
|
(test (let ([not-and
|
||||||
|
(λ () #f)])
|
||||||
|
(redex-match empty-language
|
||||||
|
(side-condition any_1 (not-and))
|
||||||
|
1))
|
||||||
|
#f)
|
||||||
|
|
||||||
(let ()
|
(let ()
|
||||||
;; tests where's ability to have redex patterns, not just syntax-case patterns
|
;; tests where's ability to have redex patterns, not just syntax-case patterns
|
||||||
(define-language var-lang [(x y z w) variable])
|
(define-language var-lang [(x y z w) variable])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user