pub fn parse_token_tree(&mut self) -> TokenTree {
        match self.token.kind {
            token::OpenDelim(..) => {
                let frame = mem::replace(
                    &mut self.token_cursor.frame,
                    self.token_cursor.stack.pop().unwrap(),
                );
                self.token = Token::new(TokenKind::CloseDelim(frame.delim), frame.span.close);
                self.bump();
                TokenTree::Delimited(frame.span, frame.delim, frame.tree_cursor.stream)
            }
            token::CloseDelim(_) | token::Eof => unreachable!(),
            _ => {
                self.bump();
                TokenTree::Token(self.prev_token.clone())
            }
        }
    }
/// Parses a single token tree from the input.
Parses a single token tree from the input.
Parses a single token tree from the input .
pub fn parse_token_tree(&mut self) -> TokenTree {
        match self.token.kind {
            token::OpenDelim(..) => {
                let frame = mem::replace(
                    &mut self.token_cursor.frame,
                    self.token_cursor.stack.pop().unwrap(),
                );
                self.token = Token::new(TokenKind::CloseDelim(frame.delim), frame.span.close);
                self.bump();
                TokenTree::Delimited(frame.span, frame.delim, frame.tree_cursor.stream)
            }
            token::CloseDelim(_) | token::Eof => unreachable!(),
            _ => {
                self.bump();
                TokenTree::Token(self.prev_token.clone())
            }
        }
    }
pub fn parse_token_tree ( & mut self ) -> TokenTree { match self . token . kind { token :: OpenDelim ( .. ) => { let frame = mem :: replace ( & mut self . token_cursor . frame , self . token_cursor . stack . pop ( ) . unwrap ( ) , ) ; self . token = Token :: new ( TokenKind :: CloseDelim ( frame . delim ) , frame . span . close ) ; self . bump ( ) ; TokenTree :: Delimited ( frame . span , frame . delim , frame . tree_cursor . stream ) } token :: CloseDelim ( _ ) | token :: Eof => unreachable ! ( ) , _ => { self . bump ( ) ; TokenTree :: Token ( self . prev_token . clone ( ) ) } } }
Parses a single token tree from the input.
Parses a single token tree from the input .
&mut self
&mut self