improved the syntax error checking for ->i

This commit is contained in:
Robby Findler 2010-08-14 08:00:13 -05:00
parent f1ecab0848
commit 12b345dc99

View File

@ -383,6 +383,12 @@ code does the parsing and validation of the syntax.
[any (raise-syntax-error #f "cannot have a #:post with any as the range" stx #'post-cond)]
[_ (void)])
(values (pre/post (syntax->list #'(id ...)) #'post-cond) #'leftover))]
[(#:post a b . stuff)
(begin
(raise-syntax-error #f "expected a sequence of variables to follow #:post" stx #'a))]
[(#:post a)
(begin
(raise-syntax-error #f "expected a sequence of variables and an expression to follow #:post" stx #'a))]
[_ (values #f leftover)])])
(syntax-case leftover ()
[()