fn parse_int_lit(&mut self) -> Result<Token> {
        let mut int = 0;

        while let Some(res) = self.input.next() {
            match res.chain_err(|| {
                                    ErrorKind::Lexer("could not read lexer input".into(), self.line)
                                })? {
                digit @ b'0'...b'9' => int = 10 * int + (digit - b'0') as u16,
                other => {
                    self.input.put_back(Ok(other));
                    break;
                }
            }
        }

        Ok(Token::Literal(Literal::Int(int)))
    }
/// Helper method for parsing an integer literal.
Helper method for parsing an integer literal.
Helper method for parsing an integer literal .
fn parse_int_lit(&mut self) -> Result<Token> {
        let mut int = 0;
        while let Some(res) = self.input.next() {
            match res.chain_err(|| {
                                    ErrorKind::Lexer("could not read lexer input".into(), self.line)
                                })? {
                digit @ b'0'...b'9' => int = 10 * int + (digit - b'0') as u16,
                other => {
                    self.input.put_back(Ok(other));
                    break;
                }
            }
        }
        Ok(Token::Literal(Literal::Int(int)))
    }
fn parse_int_lit ( & mut self ) -> Result < Token > { let mut int = 0 ; while let Some ( res ) = self . input . next ( ) { match res . chain_err ( | | { ErrorKind :: Lexer ( " " . into ( ) , self . line ) } ) ? { digit @ b'0' ... b'9' => int = 10 * int + ( digit - b'0' ) as u16 , other => { self . input . put_back ( Ok ( other ) ) ; break ; } } } Ok ( Token :: Literal ( Literal :: Int ( int ) ) ) }
Helper method for parsing an integer literal.
Helper method for parsing an integer literal .
&mut self
&mut self