Basic constructor macro for expression-binary structures.
(make-expression-binary [:operator <operator>] [:left-operand <left-operand>] [:right-operand <right-operand>])
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 '((:operator) (:left-operand) (:right-operand)) 'make-expression-binary nil))
Function:
(defun expression-binary (operator left-operand right-operand) (declare (xargs :guard (and (binary-opp operator) (expressionp left-operand) (expressionp right-operand)))) (declare (xargs :guard t)) (let ((__function__ 'expression-binary)) (declare (ignorable __function__)) (b* ((operator (mbe :logic (binary-op-fix operator) :exec operator)) (left-operand (mbe :logic (expression-fix left-operand) :exec left-operand)) (right-operand (mbe :logic (expression-fix right-operand) :exec right-operand))) (cons :binary (list operator left-operand right-operand)))))