syntax/parse: change unbound literal error message
This commit is contained in:
parent
d43792926a
commit
1572b1ece4
|
@ -612,7 +612,9 @@ An Expectation is one of
|
||||||
;; FIXME: change to normal 'error', if src gets stripped away
|
;; FIXME: change to normal 'error', if src gets stripped away
|
||||||
(define (check-literal id phase ctx)
|
(define (check-literal id phase ctx)
|
||||||
(unless (identifier-binding id phase)
|
(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
|
;; free-identifier=?/phases : id phase-level id phase-level -> boolean
|
||||||
;; Determines whether x has the same binding at phase-level phase-x
|
;; Determines whether x has the same binding at phase-level phase-x
|
||||||
|
|
|
@ -163,7 +163,7 @@
|
||||||
(begin-for-syntax/once
|
(begin-for-syntax/once
|
||||||
(for ([x (syntax->list #'(external ...))])
|
(for ([x (syntax->list #'(external ...))])
|
||||||
(unless (identifier-binding x 0)
|
(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))))))))]))
|
(quote-syntax #,stx) x))))))))]))
|
||||||
|
|
||||||
#|
|
#|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user