Basic constructor macro for struct-init structures.
(make-struct-init [:name <name>]
[:expr <expr>])
This is the usual way to construct struct-init structures. It simply conses together a structure with the specified fields.
This macro generates a new struct-init structure from scratch. See also change-struct-init, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-struct-init (&rest args) (std::make-aggregate 'struct-init args '((:name) (:expr)) 'make-struct-init nil))
Function:
(defun struct-init (name expr) (declare (xargs :guard (and (identifierp name) (expressionp expr)))) (declare (xargs :guard t)) (let ((__function__ 'struct-init)) (declare (ignorable __function__)) (b* ((name (mbe :logic (identifier-fix name) :exec name)) (expr (mbe :logic (expression-fix expr) :exec expr))) (list (cons 'name name) (cons 'expr expr)))))