take a docstring on a sum
record, struct and enum take one; sum read it where its variants go.
This commit is contained in:
@@ -332,7 +332,8 @@
|
||||
(('pub 'define name . body) body)
|
||||
(('pub (or 'record 'struct 'union) name . rest)
|
||||
(field-types (find list? (remove comment-form? rest))))
|
||||
(('pub 'sum name (variants ...))
|
||||
((or ('pub 'sum name (variants ...))
|
||||
('pub 'sum name (? string?) (variants ...)))
|
||||
(append-map (lambda (v)
|
||||
(if (and (pair? v) (pair? (cdr v))) (field-types (second v)) (list)))
|
||||
(remove comment-form? variants)))
|
||||
|
||||
Reference in New Issue
Block a user