Some code cleanup and tidy/test fixes
This commit is contained in:
parent
738e14565d
commit
ff40e37b98
17 changed files with 109 additions and 101 deletions
|
@ -203,7 +203,8 @@ impl TokenStream {
|
|||
if let Some((_, next)) = iter.peek() {
|
||||
let sp = match (&ts, &next) {
|
||||
(_, (TokenTree::Token(Token { kind: token::Comma, .. }), _)) => continue,
|
||||
((TokenTree::Token(token_left), NonJoint), (TokenTree::Token(token_right), _))
|
||||
((TokenTree::Token(token_left), NonJoint),
|
||||
(TokenTree::Token(token_right), _))
|
||||
if ((token_left.is_ident() && !token_left.is_reserved_ident())
|
||||
|| token_left.is_lit()) &&
|
||||
((token_right.is_ident() && !token_right.is_reserved_ident())
|
||||
|
@ -575,7 +576,7 @@ impl DelimSpan {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::syntax::ast::Name;
|
||||
use crate::ast::Name;
|
||||
use crate::with_default_globals;
|
||||
use crate::util::parser_testing::string_to_stream;
|
||||
use syntax_pos::{Span, BytePos, NO_EXPANSION};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue