Gcode.Model.Expr protocol (gcode v1.0.2)

Copy Markdown

A protocol for evaluating expressions.

Summary

Types

t()

All the types that implement this protocol.

Types

expr()

@type expr() :: scalar() | [scalar()]

result()

@type result() :: Gcode.Result.t(expr())

scalar()

@type scalar() :: number() | boolean() | String.t()

t()

@type t() :: term()

All the types that implement this protocol.

Functions

evaluate(term)

@spec evaluate(t()) :: result()