A pre-defined form parser.
dspec
name-only-form-parser definer-name getter => dspec
definer-name⇩ |
A top level defining form. |
getter⇩ |
The subform getter function. |
dspec |
A dspec. |
The function name-only-form-parser
is a predefined form parser for use with define-form-parser. The parser consumes one subform by calling getter and returns it. definer-name is ignored.
name-only-form-parser
can be used for function definitions where the function name is an abbreviation for the full dspec. It is the predefined parser for defun, defmacro and defgeneric forms.
You can define it to be the parser for your defining forms. using define-form-parser.
(defmacro my-definer (name &body body) `(defun ,name (x) ,@body)) (dspec:define-form-parser (my-definer (:parser dspec:name-only-form-parser)))
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:33