Skip to main content

compile_completion_strict

Function compile_completion_strict 

Source
pub fn compile_completion_strict(
    stmts: &[Stmt],
    debug: bool,
    caller_strict: bool,
) -> Result<Program, String>
Expand description

As compile_completion, but with the CALLER’s strictness folded in.

A direct eval inherits it (19.2.1.1 step 10), which decides every strict early error inside the evaluated source: eval('delete x') in strict code is a SyntaxError, and compiling the source on its own could not see that.