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