/// Produces the next token to be emitted by the lexer.
///
/// Takes care of updating the delimiters stack and aggregating
/// documentation comments.
Produces the next token to be emitted by the lexer.
Takes care of updating the delimiters stack and aggregating
documentation comments.
Produces the next token to be emitted by the lexer . Takes care of updating the delimiters stack and aggregating documentation comments .
fn produce_token(&mut self) -> Option<()> {
        let token = self.bump_token()?;
        let next = match token.as_ref() {
            Token::DocComment(_) => self.agg_doc_comments(token),
            Token::Delim(tok) if tok.is_open() => {
                self.open_braces.push(*tok);
                token
            }
            Token::Delim(delim) => {
                if !self.close_delimiter(*delim, token.span) {
                    return Some(());
                }
                token
            }
            _ => token,
        };
        self.token_stream.push_back(next);
        Some(())
    }
fn produce_token ( & mut self ) -> Option < ( ) > { let token = self . bump_token ( ) ? ; let next = match token . as_ref ( ) { Token :: DocComment ( _ ) => self . agg_doc_comments ( token ) , Token :: Delim ( tok ) if tok . is_open ( ) => { self . open_braces . push ( * tok ) ; token } Token :: Delim ( delim ) => { if ! self . close_delimiter ( * delim , token . span ) { return Some ( ( ) ) ; } token } _ => token , } ; self . token_stream . push_back ( next ) ; Some ( ( ) ) }
Produces the next token to be emitted by the lexer.
Produces the next token to be emitted by the lexer .
&mut self