fn parse_mod_items(&mut self, term: &token::Token, inner_lo: BytePos) -> PResult<'a, Mod> {
        let mut items = vec![];
        while let Some(item) = try!(self.parse_item()) {
            items.push(item);
        }

        if !self.eat(term) {
            let token_str = self.this_token_to_string();
            return Err(self.fatal(&format!("expected item, found `{}`", token_str)));
        }

        let hi = if self.span == codemap::DUMMY_SP {
            inner_lo
        } else {
            self.last_span.hi
        };

        Ok(ast::Mod {
            inner: mk_sp(inner_lo, hi),
            items: items
        })
    }
/// Given a termination token, parse all of the items in a module
Given a termination token, parse all of the items in a module
Given a termination token parse all of the items in a module
fn parse_mod_items(&mut self, term: &token::Token, inner_lo: BytePos) -> PResult<'a, Mod> {
        let mut items = vec![];
        while let Some(item) = try!(self.parse_item()) {
            items.push(item);
        }
        if !self.eat(term) {
            let token_str = self.this_token_to_string();
            return Err(self.fatal(&format!("expected item, found `{}`", token_str)));
        }
        let hi = if self.span == codemap::DUMMY_SP {
            inner_lo
        } else {
            self.last_span.hi
        };
        Ok(ast::Mod {
            inner: mk_sp(inner_lo, hi),
            items: items
        })
    }
fn parse_mod_items ( & mut self , term : & token :: Token , inner_lo : BytePos ) -> PResult < ' a , Mod > { let mut items = vec ! [ ] ; while let Some ( item ) = try ! ( self parse_item ( ) ) { items . push ( item ) ; } if ! self . eat ( term ) { let token_str = self . this_token_to_string ( ) ; return Err ( self . fatal ( & format ! ( " " token_str ) ) ) ; } let hi = if self . span == codemap :: DUMMY_SP { inner_lo } else { self . last_span . hi } ; Ok ( ast :: Mod { inner : mk_sp ( inner_lo , hi ) , items : items } ) }
Given a termination token, parse all of the items in a module
Given a termination token parse all of the items in a module
&mut self
term
&token::Token
inner_lo
BytePos
&mut self
term
&token::Token
inner_lo
BytePos