Basic constructor macro for enumer structures.
(make-enumer [:name <name>]
[:value? <value?>])
This is the usual way to construct enumer structures. It simply conses together a structure with the specified fields.
This macro generates a new enumer structure from scratch. See also change-enumer, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-enumer (&rest args) (std::make-aggregate 'enumer args '((:name) (:value?)) 'make-enumer nil))
Function:
(defun enumer (name value?) (declare (xargs :guard (and (identp name) (const-expr-optionp value?)))) (declare (xargs :guard t)) (b* ((name (mbe :logic (ident-fix name) :exec name)) (value? (mbe :logic (const-expr-option-fix value?) :exec value?))) (cons name value?)))