Point to body forms in missing-expression error. (#2356)
Improves the error message for: ``` (define-syntax (like-lambda stx) (syntax-case stx () [(_ e) #'(lambda () e)])) (like-lambda (define x 1)) ``` Based on a report from @pkoronkevich.
This commit is contained in:
parent
1ea9ec399f
commit
1258d9d28a
|
@ -246,7 +246,9 @@
|
|||
(when (null? done-bodys)
|
||||
(raise-syntax-error (string->symbol "begin (possibly implicit)")
|
||||
"no expression after a sequence of internal definitions"
|
||||
(datum->syntax #f (cons 'begin init-bodys) s)))
|
||||
(datum->syntax #f (cons 'begin init-bodys) s)
|
||||
#f
|
||||
init-bodys))
|
||||
;; As we finish expanding, we're no longer in a definition context
|
||||
(define finish-ctx (struct*-copy expand-context (accumulate-def-ctx-scopes body-ctx def-ctx-scopes)
|
||||
[context 'expression]
|
||||
|
|
Loading…
Reference in New Issue
Block a user