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