pub fn is_subscope_of(&self,
                          subscope: CodeExtent,
                          superscope: CodeExtent)
                          -> bool {
        let mut s = subscope;
        debug!("is_subscope_of({:?}, {:?})", subscope, superscope);
        while superscope != s {
            match self.opt_encl_scope(s) {
                None => {
                    debug!("is_subscope_of({:?}, {:?}, s={:?})=false",
                           subscope, superscope, s);
                    return false;
                }
                Some(scope) => s = scope
            }
        }

        debug!("is_subscope_of({:?}, {:?})=true",
               subscope, superscope);

        return true;
    }
/// Returns true if `subscope` is equal to or is lexically nested inside `superscope` and false
/// otherwise.
Returns true if `subscope` is equal to or is lexically nested inside `superscope` and false
otherwise.
Returns true if ` subscope ` is equal to or is lexically nested inside ` superscope ` and false otherwise .
pub fn is_subscope_of(&self,
                          subscope: CodeExtent,
                          superscope: CodeExtent)
                          -> bool {
        let mut s = subscope;
        debug!("is_subscope_of({:?}, {:?})", subscope, superscope);
        while superscope != s {
            match self.opt_encl_scope(s) {
                None => {
                    debug!("is_subscope_of({:?}, {:?}, s={:?})=false",
                           subscope, superscope, s);
                    return false;
                }
                Some(scope) => s = scope
            }
        }
        debug!("is_subscope_of({:?}, {:?})=true",
               subscope, superscope);
        return true;
    }
pub fn is_subscope_of ( & self , subscope : CodeExtent , superscope : CodeExtent ) -> bool { let mut s = subscope ; debug ! ( " " subscope superscope ) ; while superscope != s { match self . opt_encl_scope ( s ) { None => { debug ! ( " " subscope superscope s ) ; return false ; } Some ( scope ) => s = scope } } debug ! ( " " subscope superscope ) ; return true ; }
Returns true if `subscope` is equal to or is lexically nested inside `superscope` and false
otherwise.
Returns true if ` subscope ` is equal to or is lexically nested inside ` superscope ` and false otherwise .
&self
subscope
CodeExtent
superscope
CodeExtent
&self
subscope
CodeExtent
superscope
CodeExtent