syntax/parse: fixed error message (PR 10683)

svn: r17517
This commit is contained in:
Ryan Culpepper 2010-01-06 22:20:25 +00:00
parent 582ca03d18
commit 7b866a7cf3

View File

@ -154,6 +154,11 @@
#:allow-declare? #t
#:decls decls0
#:context #'ctx)])
(unless (and (stx-list? rest) (stx-pair? rest))
(raise-syntax-error #f
"expected non-empty clause body"
#'ctx
clause))
(with-syntax ([rest rest]
[pattern
(parse-whole-pattern #'p decls2 #:context #'ctx)]
@ -164,7 +169,7 @@
(convert-sides x #,sides
(clause-success () (let () . rest)))))))]))
(unless (and (stx-list? clauses-stx) (stx-pair? clauses-stx))
(raise-syntax-error #f "expected non-empty sequence of clauses" stx))
(raise-syntax-error #f "expected non-empty sequence of clauses" #'ctx))
(with-syntax ([(def ...) defs]
[(alternative ...)
(map for-clause (stx->list clauses-stx))])