Skip to main content

parse_suspensible_global_eval

Function parse_suspensible_global_eval 

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

Parse src as the suspensible (async) form of a global eval body.

Two differences from parse_eval_script_in, both from the same place in the reference: a global eval is not a function body (new_target_allowed, super_allowed and super_call_allowed are all false), and JS_EVAL_FLAG_ASYNC makes the body async. So new.target and super stay out of reach while await does not.