re-fix error when keywords missing in app; fix defn to allow non-keyword args withotu default after keyword args
svn: r8140
This commit is contained in:
parent
bd260e132e
commit
d2aa4f610b
|
@ -338,7 +338,11 @@
|
|||
#'rest)]
|
||||
[rest-empty (if (null? (syntax-e #'rest))
|
||||
'()
|
||||
'(null))])
|
||||
'(null))]
|
||||
[fail-rest (if (null? (syntax-e #'rest))
|
||||
'(null)
|
||||
#'rest)])
|
||||
|
||||
(let ([with-core
|
||||
(lambda (result)
|
||||
;; body of procedure, where all keyword and optional
|
||||
|
@ -402,7 +406,7 @@
|
|||
;; struct-type entry point for no keywords when a keyword is required
|
||||
(syntax/loc stx
|
||||
(fail-opt-cases (missing-kw) (opt-id ...) (self plain-id ...)
|
||||
() (rest-id . rest)
|
||||
() (rest-id . fail-rest)
|
||||
())))])
|
||||
(cond
|
||||
[(null? kws)
|
||||
|
|
|
@ -89,13 +89,13 @@
|
|||
(identifier? #'id))
|
||||
(begin
|
||||
(check-kw #'kw)
|
||||
(cons #'id (loop #'more #t)))]
|
||||
(cons #'id (loop #'more need-def?)))]
|
||||
[(kw [id def-expr] . more)
|
||||
(and (keyword? (syntax-e #'kw))
|
||||
(identifier? #'id))
|
||||
(begin
|
||||
(check-kw #'kw)
|
||||
(cons #'id (loop #'more #t)))]
|
||||
(cons #'id (loop #'more need-def?)))]
|
||||
[(kw . more)
|
||||
(keyword? (syntax-e #'kw))
|
||||
(raise-syntax-error #f
|
||||
|
|
Loading…
Reference in New Issue
Block a user