Evaluates a parsed program into a tree of plain values (language.md, sections 3 and 6.3).
Evaluation never raises on generated content. A library function that
raises, or gets or returns a value of the wrong type, evaluates to nil
and reports a runtime-error naming the prop it was evaluated for.
Summary
Functions
Evaluates one expression.
Evaluates the program's entry. Returns the evaluated tree, with a key on
every element, or nil when nothing renders, and the runtime errors.
Functions
@spec evaluate(OpenUI.Parser.Expression.ast() | term(), OpenUI.Runtime.Context.t()) :: term()
Evaluates one expression.
@spec evaluate_root(OpenUI.Program.t(), OpenUI.Runtime.Context.t()) :: {OpenUI.Element.t() | nil, [OpenUI.Error.t()]}
Evaluates the program's entry. Returns the evaluated tree, with a key on
every element, or nil when nothing renders, and the runtime errors.