Gcode.Model.Expr.Binary (gcode v0.4.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()
Specs
operator() :: :* | :/ | :+ | :- | :== | :!= | :< | :<= | :> | :>= | :&& | :|| | :^
Valid infix operators
Specs
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)
Specs
init(operator(), Gcode.Model.Expr.t(), Gcode.Model.Expr.t()) :: Gcode.Result.t(t())
Wrap an operator and two expressions in a binary expression.