Basic constructor macro for stmt-switch structures.
(make-stmt-switch [:target <target>] [: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 '((:target) (:body)) 'make-stmt-switch nil))
Function:
(defun stmt-switch (target body) (declare (xargs :guard (and (exprp target) (stmtp body)))) (declare (xargs :guard t)) (let ((__function__ 'stmt-switch)) (declare (ignorable __function__)) (b* ((target (mbe :logic (expr-fix target) :exec target)) (body (mbe :logic (stmt-fix body) :exec body))) (cons :switch (list target body)))))