Gcode.Model.Expr.Binary (gcode v1.0.0)
Represents a binary (or infix) expression in G-code, consisting of two
operands (lhs
and rhs
) and an operator to apply.
Link to this section Summary
Functions
Wrap an operator and two expressions in a binary expression.
Link to this section Types
Link to this type
operator()
@type operator() ::
:* | :/ | :+ | :- | :== | :!= | :< | :<= | :> | :>= | :&& | :|| | :^
Valid infix operators
@type t() :: %Gcode.Model.Expr.Binary{ lhs: Gcode.Option.t(Gcode.Model.Expr.t()), op: Gcode.Option.t(operator()), rhs: Gcode.Option.t(Gcode.Model.Expr.t()) }
Link to this section Functions
Link to this function
init(operator, lhs, rhs)
@spec init(operator(), Gcode.Model.Expr.t(), Gcode.Model.Expr.t()) :: Gcode.Result.t(t())
Wrap an operator and two expressions in a binary expression.