* better error message for referencing pattern variables outside a

syntax form
This commit is contained in:
Abdulaziz Ghuloum 2007-05-11 22:54:18 -04:00
parent 6fe22073dd
commit 1feea6c243
2 changed files with 2 additions and 1 deletions

Binary file not shown.

View File

@ -410,7 +410,7 @@
(stx-error e "unbound identifier"))
(case type
[(lexical core-prim macro global local-macro
global-macro displaced-lexical)
global-macro displaced-lexical syntax)
(values type (binding-value b) id)]
[else (values 'other #f #f)])))]
[(syntax-pair? e)
@ -1622,6 +1622,7 @@
(chi-expr* (cons x x*) r mr))])]
[(displaced-lexical)
(stx-error e "identifier out of context")]
[(syntax) (stx-error e "reference to pattern variable outside a syntax form")]
[else (error 'chi-expr "invalid type ~s for ~s" type
(strip e '())) (stx-error e)]))))
(define chi-set!