look past comments in a public form's header
This commit is contained in:
@@ -79,10 +79,16 @@
|
||||
;; A function is reduced to a prototype and keeps its `pub', so
|
||||
;; the importing unit declares it with external linkage
|
||||
((fn)
|
||||
(cons (copy-form-source! form (take form 5)) acc))
|
||||
(cons (copy-form-source!
|
||||
form
|
||||
(take (strip-header-comments form 5) 5))
|
||||
acc))
|
||||
;; A variable becomes an `extern' declaration
|
||||
((var)
|
||||
(cons (copy-form-source! form (cons 'extern (take (cdr form) 3))) acc))
|
||||
(cons (copy-form-source!
|
||||
form
|
||||
(cons 'extern (take (cdr (strip-header-comments form 4)) 3)))
|
||||
acc))
|
||||
((define defmacro enum import include struct typedef union)
|
||||
(cons (copy-form-source! form (cdr form)) acc))
|
||||
(else (sex-error form "pub must be followed by a definition" form))))
|
||||
|
||||
Reference in New Issue
Block a user