mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
fixing ffi doc extraction for cond-expanded procedures
This commit is contained in:
parent
64633d577c
commit
7b2fbb0bf2
1 changed files with 35 additions and 32 deletions
|
@ -723,6 +723,8 @@ h4 { color: #222288; border-top: 1px solid #4588ba; }
|
|||
args)))))
|
||||
(('define-c-const type (or (name _) name))
|
||||
(list (list 'const: type name)))
|
||||
(('cond-expand (test . clauses) . rest)
|
||||
(append-map get-ffi-signatures clauses))
|
||||
(((or 'define-c-struct 'define-c-class 'define-c-type) name . rest)
|
||||
(let lp ((ls rest) (res '()))
|
||||
(cond
|
||||
|
@ -809,9 +811,10 @@ h4 { color: #222288; border-top: 1px solid #4588ba; }
|
|||
(write-to-string sig)))
|
||||
|
||||
(define (insert-signature orig-ls name sig)
|
||||
(let ((sig (if (pair? sig) sig (and name (list name)))))
|
||||
(cond
|
||||
((not (pair? sig))
|
||||
orig-ls)
|
||||
'())
|
||||
(else
|
||||
(let ((name
|
||||
(cond
|
||||
|
@ -840,7 +843,7 @@ h4 { color: #222288; border-top: 1px solid #4588ba; }
|
|||
(intersperse (map write-signature sig) '(br)))))))
|
||||
,@ls))
|
||||
(else
|
||||
(lp (cdr ls) (cons (car ls) rev-pre)))))))))
|
||||
(lp (cdr ls) (cons (car ls) rev-pre))))))))))
|
||||
|
||||
;;> Extract inline Scribble documentation (with the ;;> prefix) from
|
||||
;;> the source file \var{file}, associating any signatures from the
|
||||
|
|
Loading…
Add table
Reference in a new issue