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
Functions
Wrap an inner expression and operator in a unary expression.
Link to this section Types
Link to this type
operator()
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
init(operator(), Gcode.Model.Expr.t()) :: Gcode.Result.t(t())
Wrap an inner expression and operator in a unary expression.