/// Search for a symbol's information in all the scopes defined
/// until the code position.
Search for a symbol's information in all the scopes defined
until the code position.
Search for a symbol ' s information in all the scopes defined until the code position .
pub fn search(&self, sym: Symbol) -> Option<&T> {
        let value;
        unsafe {
            value = (*self.table.as_ptr()).get(&sym);
        }
        if value.is_some() {
            return value;
        }
        for parent in self.parents.iter().rev() {
            if let Some(val) = parent.search(sym) {
                return Some(val);
            }
        }
        None
    }
pub fn search ( & self , sym : Symbol ) -> Option < & T > { let value ; unsafe { value = ( * self . table . as_ptr ( ) ) . get ( & sym ) ; } if value . is_some ( ) { return value ; } for parent in self . parents . iter ( ) . rev ( ) { if let Some ( val ) = parent . search ( sym ) { return Some ( val ) ; } } None }
Search for a symbol's information in all the scopes defined
until the code position.
Search for a symbol ' s information in all the scopes defined until the code position .
&self
sym
Symbol