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