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