I wish I had aspirations for this being some standard that someone else might follow, but realistically I'm just irritated at my own laziness with regard to documentation, so I wrote a solution. The forceful nature of the validator is really just because I didn't want to write a smarter parser. As an added bonus, all the docs now look the same when I look at them in the repl, so that's kind of nice.
-If you like, you can [download it](https://github.com/frankduncan/docgen/releases/download/0.2/docgen_0.2.tar.gz)
+If you like, you can [download it](https://github.com/frankduncan/docgen/releases/download/0.3/docgen_0.3.tar.gz)
## Usage
(:export
#:*special-variable*
#:test-condition
- #:func-that-does-stuff #:noargs #:result-list #:has-no-examples
+ #:func-that-does-stuff #:noargs #:no-args-and-values #:result-list #:has-no-examples
#:values-result #:has-optional #:has-keywords #:has-rest))
(in-package #:success1)
(func-that-does-stuff) => (:failure \"path/to/error.lisp\" \"Error msg\" 20 0)"
nil)
+(defun no-args-and-values ()
+ "NO-ARGS-AND-VALUES => RESULT
+
+ RESULT: :nothing
+
+DESCRIPTION:
+
+ RESULT-LIST runs all the things against a file and returns
+ as soon as the first func error is found."
+ nil)
+
(defun has-no-examples ()
"HAS-NO-EXAMPLES => RESULT
* **function [has-no-examples](#function-has-no-examples)** - _has-no-examples_ runs all the things against a file and returns as soon as the first func error is found.
* **function [has-optional](#function-has-optional)** - _has-optional_ runs all the things against a file and returns as soon as the first func error is found.
* **function [has-rest](#function-has-rest)** - _has-rest_ runs all the things against a file and returns as soon as the first func error is found.
+* **function [no-args-and-values](#function-no-args-and-values)** - _result_-LIST runs all the things against a file and returns as soon as the first func error is found.
* **function [noargs](#function-noargs)** - _noargs_ runs all the things against a file and returns as soon as the first func error is found.
* **function [result-list](#function-result-list)** - _result-list_ runs all the things against a file and returns as soon as the first func error is found.
* **condition [test-condition](#condition-test-condition)** - Simple documentation.
This second section uses _path_ and _x_ as something we should talk about, but doesn't use all the arguments (let's include _path_ here for fun)
+## Function **NO-ARGS-AND-VALUES**
+
+#### Syntax:
+
+**no-args-and-values** => _result_
+
+```result::= :nothing```
+
+#### Description:
+
+_result_-LIST runs all the things against a file and returns as soon as the first func error is found.
+
## Function **NOARGS**
#### Syntax:
(asdf:defsystem docgen
:name "Documentation Generator"
- :version "0.2"
+ :version "0.3"
:maintainer "Frank Duncan (frank@kank.com)"
:author "Frank Duncan (frank@kank.com)"
:serial t
(append
(when types (list types))
(list
- (parse-arguments-and-values args-to-be-defined)
+ (when args-to-be-defined (parse-arguments-and-values args-to-be-defined))
(parse-description))
(when (more) (list (parse-examples)))))))))
(case (car type)
(:list (format nil "(~{~(~A~)~^ ~})" (mapcar #'cadr (cadr type))))
(:or (format nil "~{~(~A~)~^ | ~}" (mapcar #'cadr (cadr type))))
- (:asterisk (format nil "~(~A~)*" (cadr (car (cadr type))))))))
+ (:asterisk (format nil "~(~A~)*" (cadr (car (cadr type)))))
+ (:symbol (format nil "~(~A~)" (cadr (car (cadr type))))))))
(if (not types)
""
(format nil "~{~A~%~}~%"
(format nil "~A~A~A~A~A"
(format-header (get-section :function))
(format-types (get-section :types))
- (format-args-and-values (get-section :arguments-and-values))
+ (if
+ (get-section :arguments-and-values)
+ (format-args-and-values (get-section :arguments-and-values))
+ "")
(format-description (get-section :description))
(format-examples (get-section :examples)))))