pub fn parse_lifetimes(&mut self) -> OptVec<ast::Lifetime> {
        /*!
         *
         * Parses zero or more comma separated lifetimes.
         * Expects each lifetime to be followed by either
         * a comma or `>`.  Used when parsing type parameter
         * lists, where we expect something like `<'a, 'b, T>`.
         */

        let mut res = opt_vec::Empty;
        loop {
            match self.token {
                token::LIFETIME(_) => {
                    res.push(self.parse_lifetime());
                }
                _ => {
                    return res;
                }
            }

            match self.token {
                token::COMMA => { self.bump();}
                token::GT => { return res; }
                token::BINOP(token::SHR) => { return res; }
                _ => {
                    let msg = format!("expected `,` or `>` after lifetime \
                                      name, got: {:?}",
                                      self.token);
                    self.fatal(msg);
                }
            }
        }
    }
// matches lifetimes = ( lifetime ) | ( lifetime , lifetimes )
// actually, it matches the empty one too, but putting that in there
// messes up the grammar....
matches lifetimes = ( lifetime ) | ( lifetime , lifetimes )
actually, it matches the empty one too, but putting that in there
messes up the grammar
matches lifetimes = ( lifetime ) | ( lifetime lifetimes ) actually it matches the empty one too but putting that in there messes up the grammar
pub fn parse_lifetimes(&mut self) -> OptVec<ast::Lifetime> {
        /*!
         *
         * Parses zero or more comma separated lifetimes.
         * Expects each lifetime to be followed by either
         * a comma or `>`.  Used when parsing type parameter
         * lists, where we expect something like `<'a, 'b, T>`.
         */
        let mut res = opt_vec::Empty;
        loop {
            match self.token {
                token::LIFETIME(_) => {
                    res.push(self.parse_lifetime());
                }
                _ => {
                    return res;
                }
            }
            match self.token {
                token::COMMA => { self.bump();}
                token::GT => { return res; }
                token::BINOP(token::SHR) => { return res; }
                _ => {
                    let msg = format!("expected `,` or `>` after lifetime \
                                      name, got: {:?}",
                                      self.token);
                    self.fatal(msg);
                }
            }
        }
    }
pub fn parse_lifetimes ( & mut self ) -> OptVec < ast :: Lifetime > { /*!
         *
         * Parses zero or more comma separated lifetimes.
         * Expects each lifetime to be followed by either
         * a comma or `>`.  Used when parsing type parameter
         * lists, where we expect something like `<'a, 'b, T>`.
         */ let mut res = opt_vec :: Empty ; loop { match self . token { token :: LIFETIME ( _ ) => { res . push ( self . parse_lifetime ( ) ) ; } _ => { return res ; } } match self . token { token :: COMMA => { self . bump ( ) ; } token :: GT => { return res ; } token :: BINOP ( token :: SHR ) => { return res ; } _ => { let msg = format ! ( " \
 " self token ) ; self . fatal ( msg ) ; } } } }
matches lifetimes = ( lifetime ) | ( lifetime , lifetimes )
actually, it matches the empty one too, but putting that in there
messes up the grammar....
matches lifetimes = ( lifetime ) | ( lifetime lifetimes ) actually it matches the empty one too but putting that in there messes up the grammar ....
&mut self
&mut self