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