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