Better error message in parse-func.

This commit is contained in:
Alex Shinn 2014-08-24 22:46:06 +09:00
parent 101c61f083
commit d10de2f613

View file

@ -186,7 +186,7 @@
(define (parse-func func . o) (define (parse-func func . o)
(if (not (and (= 3 (length func)) (if (not (and (= 3 (length func))
(or (identifier? (cadr func)) (or (identifier? (cadr func))
(and (list (cadr func)) (and (list? (cadr func))
(<= 1 (length (cadr func)) 3) (<= 1 (length (cadr func)) 3)
(every (lambda (x) (or (identifier? x) (not x) (string? x))) (every (lambda (x) (or (identifier? x) (not x) (string? x)))
(cadr func)))) (cadr func))))
@ -1581,7 +1581,7 @@
"}\n\n") "}\n\n")
;; make the finalizer available ;; make the finalizer available
(set! *funcs* (set! *funcs*
(cons (parse-func `(void ,(cadr x) (,name))) *funcs*)))))) (cons (parse-func `(void ,y (,name))) *funcs*))))))
;; maybe write constructor ;; maybe write constructor
(cond (cond
((memq 'constructor: type) ((memq 'constructor: type)