syntax/parse: change unbound literal error message

This commit is contained in:
Ryan Culpepper 2010-05-14 16:08:16 -06:00
parent d43792926a
commit 1572b1ece4
2 changed files with 4 additions and 2 deletions

View File

@ -612,7 +612,9 @@ An Expectation is one of
;; FIXME: change to normal 'error', if src gets stripped away
(define (check-literal id phase ctx)
(unless (identifier-binding id phase)
(raise-syntax-error #f "unbound identifier not allowed as literal" ctx id)))
(raise-syntax-error #f
(format "literal is unbound in phase ~s" phase)
ctx id)))
;; free-identifier=?/phases : id phase-level id phase-level -> boolean
;; Determines whether x has the same binding at phase-level phase-x

View File

@ -163,7 +163,7 @@
(begin-for-syntax/once
(for ([x (syntax->list #'(external ...))])
(unless (identifier-binding x 0)
(raise-syntax-error #f "unbound identifier not allowed as literal"
(raise-syntax-error #f "literal is unbound in phase 0"
(quote-syntax #,stx) x))))))))]))
#|