~dieggsy/chalk

2b7181677137d4330a2894e9304fe3c23b1a0135 — dieggsy 3 years ago 6091733
Allow empty docexpr
1 files changed, 7 insertions(+), 4 deletions(-)

M chalk-bin.scm
M chalk-bin.scm => chalk-bin.scm +7 -4
@@ 169,16 169,19 @@
  (define documentable-expr?
    (and (not (null? (cddr exp)))
         (not (null? (cdddr exp)))
         (eqv? '@ (third exp))
         (not (null? (fourth exp)))))
         (eqv? '@ (third exp))))
  (define (tagged exp tags)
    (let ((doc (fourth exp)))
      (and (not (null? doc))
           (member (car doc) tags))))
  (when (and (pair? exp)
             (not (null? (cdr exp))))
    (cond ((and documentable-expr?
                (or (member (car (fourth exp)) syntax-tags)
                (or (tagged exp syntax-tags)
                    (eqv? 'define-syntax (first exp))))
           (document-procedure exp 'syntax))
          ((and documentable-expr?
                (or (member (car (fourth exp)) procedure-tags)
                (or (tagged exp procedure-tags)
                    (and (eqv? 'define (first exp))
                         (pair? (second exp)))))
           (document-procedure exp))