docread: support non-list lambdas

This makes lambdas with tail arguments work properly.

Change-Id: I6a6a6964be286b69ebe28f3798f6f0d16626b5be
This commit is contained in:
puck 2025-06-23 12:22:20 +00:00
parent 0340f6e830
commit a333a18922

View file

@ -129,7 +129,7 @@
(set! comments '())))
; (define (foo bar baz) quux)
((and (list? i) (eq? (car i) 'define) (list? (cadr i)))
((and (list? i) (eq? (car i) 'define) (pair? (cadr i)))
(let* ((def (cadr i)) (name (car def)) (args (cdr def)))
(set! defines (cons (cons name (make-doc-entry (make-lambda-doc name args '() #f) (reverse comments))) defines))
(set! comments '())))