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

Represents a unary (or prefix) expression in G-code. A unary consists of a single operand and an operator.

Link to this section Summary

Types

Valid unary operators

t()

Functions

Wrap an inner expression and operator in a unary expression.

Link to this section Types

Specs

operator() :: :! | :+ | :- | :"#"

Valid unary operators

Specs

t() :: %Gcode.Model.Expr.Unary{
  expr: Gcode.Option.t(Gcode.Model.Expr.t()),
  op: Gcode.Option.t(atom())
}

Link to this section Functions

Link to this function

init(operator, expr)

Specs

Wrap an inner expression and operator in a unary expression.