Skip to main content

eval_expr

Function eval_expr 

Source
pub fn eval_expr(expr: &Expr, scope: &Scope) -> Result<Value, CoreError>
Expand description

Evaluates expr against scope. The public entry point; internally delegates to a private helper that threads a span to fall back on for spanless expression kinds (Bool, Binary, If) down through recursive calls. Called directly (rather than through render_template or the deferred-template checker below, both of which have richer context to use as that fallback), the best available fallback is expr’s own span if it has one, or a zero-width span at the start of the source as a last resort.