pub fn expect_keyword(&mut self, kw: keywords::Keyword) {
        if !self.eat_keyword(kw) {
            let id_str = self.id_to_str(kw.to_ident()).to_str();
            let token_str = self.this_token_to_str();
            self.fatal(format!("expected `{}`, found `{}`",
                               id_str,
                               token_str))
        }
    }
// if the given word is not a keyword, signal an error.
// if the next token is not the given word, signal an error.
// otherwise, eat it.
if the given word is not a keyword, signal an error.
if the next token is not the given word, signal an error.
otherwise, eat it.
if the given word is not a keyword signal an error . if the next token is not the given word signal an error . otherwise eat it .
pub fn expect_keyword(&mut self, kw: keywords::Keyword) {
        if !self.eat_keyword(kw) {
            let id_str = self.id_to_str(kw.to_ident()).to_str();
            let token_str = self.this_token_to_str();
            self.fatal(format!("expected `{}`, found `{}`",
                               id_str,
                               token_str))
        }
    }
pub fn expect_keyword ( & mut self , kw : keywords :: Keyword ) { if ! self . eat_keyword ( kw ) { let id_str = self . id_to_str ( kw . to_ident ( ) ) . to_str ( ) ; let token_str = self . this_token_to_str ( ) ; self . fatal ( format ! ( " " id_str token_str ) ) } }
if the given word is not a keyword, signal an error.
if the given word is not a keyword signal an error .
&mut self
kw
keywords::Keyword
&mut self
kw
keywords::Keyword