improved the syntax error checking for ->i
This commit is contained in:
parent
f1ecab0848
commit
12b345dc99
|
@ -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 ()
|
||||
[()
|
||||
|
|
Loading…
Reference in New Issue
Block a user