Gcode.Model.Expr.Binary (gcode v0.4.1)

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

Types

Valid infix operators

t()

Functions

Wrap an operator and two expressions in a binary expression.

Link to this section Types

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

Wrap an operator and two expressions in a binary expression.