Gcode. Model. Expr. Binary
(gcode v1.0.2)
Copy Markdown
Represents a binary (or infix) expression in G-code, consisting of two
operands (lhs and rhs) and an operator to apply.
Summary
Functions
Wrap an operator and two expressions in a binary expression.
Types
@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()) }
Functions
@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.