Gcode.Model.Expr.Unary (gcode v1.0.1)
Represents a unary (or prefix) expression in G-code. A unary consists of a single operand and an operator.
Summary
Functions
Wrap an inner expression and operator in a unary expression.
Types
Link to this type
operator()
@type operator() :: :! | :+ | :- | :"#"
Valid unary operators
@type t() :: %Gcode.Model.Expr.Unary{ expr: Gcode.Option.t(Gcode.Model.Expr.t()), op: Gcode.Option.t(atom()) }
Functions
Link to this function
init(operator, expr)
@spec init(operator(), Gcode.Model.Expr.t()) :: Gcode.Result.t(t())
Wrap an inner expression and operator in a unary expression.