Currently libproc_macro does not use `DotEq` token.
https://github.com/rust-lang/rust/pull/49545 changed libproc_macro
to not generate `DotEq` token.
token::Token::DotDot |
token::Token::DotDotDot |
token::Token::DotDotEq |
- token::Token::DotEq |
token::Token::Comma |
token::Token::Semi |
token::Token::Colon |
token::Lifetime(..) => Class::Lifetime,
token::Eof | token::Interpolated(..) |
- token::Tilde | token::At | token::DotEq | token::SingleQuote => Class::None,
+ token::Tilde | token::At| token::SingleQuote => Class::None,
};
// Anything that didn't return above is the simple case where we the
token::At => "At",
token::Dot => "Dot",
token::DotDot => "DotDot",
- token::DotEq => "DotEq",
token::DotDotDot => "DotDotDot",
token::DotDotEq => "DotDotEq",
token::Comma => "Comma",
DotDot,
DotDotDot,
DotDotEq,
- DotEq, // HACK(durka42) never produced by the parser, only used for libproc_macro
Comma,
Semi,
Colon,
Dot => match joint {
Dot => DotDot,
DotDot => DotDotDot,
- DotEq => DotDotEq,
_ => return None,
},
DotDot => match joint {
_ => return None,
},
- Le | EqEq | Ne | Ge | AndAnd | OrOr | Tilde | BinOpEq(..) | At | DotDotDot | DotEq |
+ Le | EqEq | Ne | Ge | AndAnd | OrOr | Tilde | BinOpEq(..) | At | DotDotDot |
DotDotEq | Comma | Semi | ModSep | RArrow | LArrow | FatArrow | Pound | Dollar |
Question | OpenDelim(..) | CloseDelim(..) => return None,
(&DotDot, &DotDot) |
(&DotDotDot, &DotDotDot) |
(&DotDotEq, &DotDotEq) |
- (&DotEq, &DotEq) |
(&Comma, &Comma) |
(&Semi, &Semi) |
(&Colon, &Colon) |
token::DotDot => "..".to_string(),
token::DotDotDot => "...".to_string(),
token::DotDotEq => "..=".to_string(),
- token::DotEq => ".=".to_string(),
token::Comma => ",".to_string(),
token::Semi => ";".to_string(),
token::Colon => ":".to_string(),
})
}
- DotEq => op!('.', '='),
OpenDelim(..) | CloseDelim(..) => unreachable!(),
Whitespace | Comment | Shebang(..) | Eof => unreachable!(),
}