mirror of
https://github.com/carp-lang/Carp.git
synced 2024-10-26 13:51:50 +03:00
09c91c7f90
* 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
16 lines
668 B
Plaintext
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)) [])))
|