@@ -53,7 +53,7 @@ impl<'a> TokenTreesReader<'a> {
5353 token:: OpenDelim ( delim) => buf. push ( self . parse_token_tree_open_delim ( delim) ) ,
5454 token:: CloseDelim ( delim) => return Err ( self . close_delim_err ( delim) ) ,
5555 token:: Eof => return Ok ( buf. into_token_stream ( ) ) ,
56- _ => buf. push ( self . parse_token_tree_other ( ) ) ,
56+ _ => buf. push ( self . parse_token_tree_non_delim_non_eof ( ) ) ,
5757 }
5858 }
5959 }
@@ -66,11 +66,10 @@ impl<'a> TokenTreesReader<'a> {
6666 token:: OpenDelim ( delim) => buf. push ( self . parse_token_tree_open_delim ( delim) ) ,
6767 token:: CloseDelim ( ..) => return buf. into_token_stream ( ) ,
6868 token:: Eof => {
69- let mut err = self . eof_err ( ) ;
70- err. emit ( ) ;
69+ self . eof_err ( ) . emit ( ) ;
7170 return buf. into_token_stream ( ) ;
7271 }
73- _ => buf. push ( self . parse_token_tree_other ( ) ) ,
72+ _ => buf. push ( self . parse_token_tree_non_delim_non_eof ( ) ) ,
7473 }
7574 }
7675 }
@@ -245,9 +244,10 @@ impl<'a> TokenTreesReader<'a> {
245244 }
246245
247246 #[ inline]
248- fn parse_token_tree_other ( & mut self ) -> TokenTree {
249- // `spacing` for the returned token is determined by the next token:
250- // its kind and its `preceded_by_whitespace` status.
247+ fn parse_token_tree_non_delim_non_eof ( & mut self ) -> TokenTree {
248+ // `this_spacing` for the returned token refers to whether the token is
249+ // immediately followed by another op token. It is determined by the
250+ // next token: its kind and its `preceded_by_whitespace` status.
251251 let ( next_tok, is_next_tok_preceded_by_whitespace) = self . string_reader . next_token ( ) ;
252252 let this_spacing = if is_next_tok_preceded_by_whitespace || !next_tok. is_op ( ) {
253253 Spacing :: Alone
0 commit comments