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