fn add_var(env: &Env, st: &mut State, var: &str) {
    // Don't bother if it's $this, as this is captured implicitly
    if var == special_idents::THIS {
        st.captured_this = true;
    } else if
    // If it's bound as a parameter or definite assignment, don't add it
    // Also don't add the pipe variable and superglobals
    (should_capture_var(env, var))
        && !(var == special_idents::DOLLAR_DOLLAR
            || superglobals::GLOBALS == var
            || superglobals::is_superglobal(var))
    {
        st.captured_vars.add(var.to_string())
    }
}
// Add a variable to the captured variables
Add a variable to the captured variables
Add a variable to the captured variables
fn add_var(env: &Env, st: &mut State, var: &str) {
    // Don't bother if it's $this, as this is captured implicitly
    if var == special_idents::THIS {
        st.captured_this = true;
    } else if
    // If it's bound as a parameter or definite assignment, don't add it
    // Also don't add the pipe variable and superglobals
    (should_capture_var(env, var))
        && !(var == special_idents::DOLLAR_DOLLAR
            || superglobals::GLOBALS == var
            || superglobals::is_superglobal(var))
    {
        st.captured_vars.add(var.to_string())
    }
}
fn add_var ( env : & Env , st : & mut State , var : & str ) { // Don't bother if it's $this, as this is captured implicitly if var == special_idents :: THIS { st . captured_this = true ; } else if // If it's bound as a parameter or definite assignment, don't add it // Also don't add the pipe variable and superglobals ( should_capture_var ( env , var ) ) && ! ( var == special_idents :: DOLLAR_DOLLAR || superglobals :: GLOBALS == var || superglobals :: is_superglobal ( var ) ) { st . captured_vars . add ( var . to_string ( ) ) } }
Add a variable to the captured variables
Add a variable to the captured variables
env
&Env
st
&mut State
var
&str