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