A pre-defined form parser.
dspec
single-form-with-options-form-parser definer-name getter => dspec
definer-name⇩ |
A top level defining form. |
getter⇩ |
The subform getter function. |
dspec |
A dspec. |
The function single-form-with-options-form-parser
is a predefined form parser for use with define-form-parser. The parser consumes one subform by calling getter and returns a dspec made from definer-name and either the first element of the subform if it is a cons or the subform itself otherwise. This can be used in the common case where a defining form has a name with options that follows the defining macro and the dspec class is the same as the defining macro, for example defstruct.
single-form-with-options-form-parser
is the predefined parser for defstruct, fli:define-foreign-function
, fli:define-foreign-variable
, fli:define-c-struct
, fli:define-c-union
, fli:define-c-enum
and fli:define-c-typedef
forms.
You can define it to be the parser for your defining forms. using define-form-parser.
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:33