Skip to main content

parse_eval_script_in

Function parse_eval_script_in 

Source
pub fn parse_eval_script_in(
    src: &str,
    strict: bool,
    context: EvalContext,
) -> Result<Program>
Expand description

Parse src as a direct eval body with the caller’s privileges.

An eval’d body is not a function of its own, but it runs inside one: eval("super.f()") is legal in a method, and eval("new.target") is legal in any function. The parser has to be told, because the source text alone has no way to know.