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

Types

Valid infix operators

t()

Functions

Wrap an operator and two expressions in a binary expression.

Link to this section 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())
}

Link to this section Functions

Link to this function

init(operator, lhs, rhs)

Wrap an operator and two expressions in a binary expression.