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