Skip to main content

Module eval

Module eval 

Source
Expand description

Template evaluation engine.

The evaluator walks a parsed Template AST and produces a string output. It resolves variables and dispatches processor/command calls through the provided EvalContext and Registry.

Temporary scopes (e.g. foreach loop bindings) are managed internally. The host’s EvalContext only sees named scope operations like "global" and "local".

Structs§

EvalOptions
Configuration for resource limits, cancellation, and error handling during template evaluation.
SimpleContext
A minimal EvalContext implementation for testing and single-file use.

Traits§

EvalContext
Trait implemented by the host application to provide state and side effects to the weaver-lang evaluator.

Functions§

eval_expr_value
Evaluate a parsed expression and return its Value directly.
evaluate
Evaluate a template against a context and registry, producing the final string output.
evaluate_with_options
Evaluate a template with custom options for resource limits, cancellation, and lenient mode.