Carp/core/Project.carp
Erik Svedäng 09c91c7f90
feat: Emit docs for top level bindings (#1253)
* refactor: Tiny cleanup before we begin

* refactor: Moved module finding to its own local function

* feat: save-docs-internal is now a binary command

* feat: This seems to work

* fix: Cleaned up the code, save-docs now emit one module per file listed
2021-06-28 19:56:59 +02:00

16 lines
668 B
Plaintext

(defndynamic project-config [bindings]
(if (< (length bindings) 2)
(list)
(cons-last (project-config (cdr (cdr bindings))) (list 'do (list 'Project.config
(car bindings) (car (cdr bindings)))))))
(doc defproject "Define a project configuration.")
(defmacro defproject [:rest bindings]
(project-config bindings))
(doc save-docs "A simple version of `save-docs-ex` that lets you list all the modules directly as unquoted symbols. Does not handle global symbols, use `save-docs-ex` for that.
Example usage: `(save-docs Int Float String)`")
(defmacro save-docs [:rest modules]
(eval (list 'save-docs-ex (list quote (collect-into modules array)) [])))