pub fn next_token(&mut self) -> Option<Result<TokenSpan, TokenSpan>> {
        let res = self.next_token_inner();
        let out = match self.bump_err.take() {
            None => res,
            Some(rep) => Some(Err(Error {
                report: rep,
                poison: res.and_then(|r| r.map(|o| Some(o))
                                          .unwrap_or_else(|e| e.poison))
            }))
        };

        match out {
            Some(ref r) => trace!("Produced Token: {:?}", r),
            None => trace!("Produced None token!"),
        }
        out
    }
/// Tells the tokenizer to fetch the next token from the source.
///
/// The function returns...
///
/// - `Ok(None)` if EOF was reached and no lexing error occured
/// - `Ok(Some(_))` if there was a next token and no lexing error occured
/// - `Err(_)` if a lexing error occured (invalid source code)
///
/// The error value might contain a poisened token which can be used to
/// proceed "normally". However, it is not advised to really proceed
/// normally: usually lexing error results in an ill formed token stream,
/// which in turn will result in parsing errors. These parsing errors
/// will look strange to the user, since the tokens the parser works with
/// are only recovered/poisened.
Tells the tokenizer to fetch the next token from the source.
The function returns



The error value might contain a poisened token which can be used to
proceed "normally". However, it is not advised to really proceed
normally: usually lexing error results in an ill formed token stream,
which in turn will result in parsing errors. These parsing errors
will look strange to the user, since the tokens the parser works with
are only recovered/poisened.
Tells the tokenizer to fetch the next token from the source . The function returns The error value might contain a poisened token which can be used to proceed " normally " . However it is not advised to really proceed normally : usually lexing error results in an ill formed token stream which in turn will result in parsing errors . These parsing errors will look strange to the user since the tokens the parser works with are only recovered / poisened .
pub fn next_token(&mut self) -> Option<Result<TokenSpan, TokenSpan>> {
        let res = self.next_token_inner();
        let out = match self.bump_err.take() {
            None => res,
            Some(rep) => Some(Err(Error {
                report: rep,
                poison: res.and_then(|r| r.map(|o| Some(o))
                                          .unwrap_or_else(|e| e.poison))
            }))
        };
        match out {
            Some(ref r) => trace!("Produced Token: {:?}", r),
            None => trace!("Produced None token!"),
        }
        out
    }
pub fn next_token ( & mut self ) -> Option < Result < TokenSpan , TokenSpan > > { let res = self . next_token_inner ( ) ; let out = match self . bump_err . take ( ) { None => res , Some ( rep ) => Some ( Err ( Error { report : rep , poison : res . and_then ( | r | r . map ( | o | Some ( o ) ) . unwrap_or_else ( | e | e . poison ) ) } ) ) } ; match out { Some ( ref r ) => trace ! ( " " r ) , None => trace ! ( " " ) , } out }
Tells the tokenizer to fetch the next token from the source.
Tells the tokenizer to fetch the next token from the source .
&mut self
&mut self