raise a syntax error uses of keywords in case->
This commit is contained in:
parent
fdc3b4a685
commit
9cf9897b16
|
@ -44,7 +44,13 @@
|
|||
[(-> doms ... #:rest rst rng)
|
||||
(values #'(doms ...) #'rst (parse-rng stx #'rng))]
|
||||
[(-> doms ... rng)
|
||||
(values #'(doms ...) #f (parse-rng stx #'rng))]
|
||||
(begin
|
||||
(for ([x (in-list (append (syntax->list #'(doms ...))
|
||||
(list #'rng)))])
|
||||
(when (keyword? (syntax-e x))
|
||||
(raise-syntax-error 'case-> "does not accept keywords"
|
||||
stx x)))
|
||||
(values #'(doms ...) #f (parse-rng stx #'rng)))]
|
||||
[(x y ...)
|
||||
(raise-syntax-error #f "expected ->" stx #'x)]
|
||||
[_
|
||||
|
|
Loading…
Reference in New Issue
Block a user