and, or now wrap single term with #%expression

That disallows things like (and (define x 1)), previously accepted.
This commit is contained in:
Ryan Culpepper 2010-09-14 12:20:34 -06:00
parent ae645a18c1
commit 4a29ce914f

View File

@ -400,7 +400,11 @@
(if (if (stx-pair? e)
(stx-null? (stx-cdr e))
#t)
(stx-car e)
(datum->syntax
here
(list (quote-syntax #%expression)
(stx-car e))
x)
(datum->syntax
here
(list (quote-syntax if)
@ -422,7 +426,11 @@
(if (if (stx-pair? e)
(stx-null? (stx-cdr e))
#f)
(stx-car e)
(datum->syntax
here
(list (quote-syntax #%expression)
(stx-car e))
x)
(if (stx-list? e)
(let-values ([(tmp) 'or-part])
(datum->syntax