pub fn resolve(&self, name: ResolvableName, recur: bool) -> Vec<Spanned<Def2<'t>>> {
        let mut found = Vec::new();
        found.extend(
            self.defs
                .borrow()
                .get(&name)
                .into_iter()
                .flat_map(|d| d.iter()),
        );
        found.extend(
            self.imported_defs
                .borrow()
                .get(&name)
                .into_iter()
                .flat_map(|d| d.iter()),
        );
        for s in self.imported_scopes.borrow().iter() {
            found.extend(
                s.defs
                    .borrow()
                    .get(&name)
                    .into_iter()
                    .flat_map(|d| d.iter()),
            );
        }
        if found.is_empty() && self.parent.is_some() {
            self.parent.unwrap().resolve(name, recur)
        } else {
            found
        }
    }
/// Find a name in this scope.
///
/// This only searches this scope and does not proceed to parent or child
/// scopes. Use a dedicated name resolver for that.
Find a name in this scope.
This only searches this scope and does not proceed to parent or child
scopes. Use a dedicated name resolver for that.
Find a name in this scope . This only searches this scope and does not proceed to parent or child scopes . Use a dedicated name resolver for that .
pub fn resolve(&self, name: ResolvableName, recur: bool) -> Vec<Spanned<Def2<'t>>> {
        let mut found = Vec::new();
        found.extend(
            self.defs
                .borrow()
                .get(&name)
                .into_iter()
                .flat_map(|d| d.iter()),
        );
        found.extend(
            self.imported_defs
                .borrow()
                .get(&name)
                .into_iter()
                .flat_map(|d| d.iter()),
        );
        for s in self.imported_scopes.borrow().iter() {
            found.extend(
                s.defs
                    .borrow()
                    .get(&name)
                    .into_iter()
                    .flat_map(|d| d.iter()),
            );
        }
        if found.is_empty() && self.parent.is_some() {
            self.parent.unwrap().resolve(name, recur)
        } else {
            found
        }
    }
pub fn resolve ( & self , name : ResolvableName , recur : bool ) -> Vec < Spanned < Def2 < ' t > > > { let mut found = Vec :: new ( ) ; found . extend ( self . defs . borrow ( ) . get ( & name ) . into_iter ( ) . flat_map ( | d | d . iter ( ) ) , ) ; found . extend ( self . imported_defs . borrow ( ) . get ( & name ) . into_iter ( ) . flat_map ( | d | d . iter ( ) ) , ) ; for s in self . imported_scopes . borrow ( ) . iter ( ) { found . extend ( s . defs . borrow ( ) . get ( & name ) . into_iter ( ) . flat_map ( | d | d . iter ( ) ) , ) ; } if found . is_empty ( ) && self . parent . is_some ( ) { self . parent . unwrap ( ) . resolve ( name , recur ) } else { found } }
Find a name in this scope.
Find a name in this scope .
&self
name
ResolvableName
recur
bool
&self
name
ResolvableName
recur
bool