Skip to main content

pre_eval_local

Function pre_eval_local 

Source
fn pre_eval_local(
    args: &[Arg],
    env: &Environment,
    context: &BuiltinContext<'_>,
) -> Result<RValue, RError>
Expand description

Evaluate an expression in a temporary local environment.

Creates a new child of envir (default: the calling environment) and evaluates expr in it. The local environment is discarded after evaluation, so any bindings created inside are not visible to the caller.

@param expr expression to evaluate (not evaluated before dispatch) @param envir parent environment for the local scope (default: calling environment) @return the result of evaluating expr