rust/compiler/rustc_parse/src/parser
Nicholas Nethercote 2a1e2e9632 Replace ast::TokenKind::BinOp{,Eq} and remove BinOpToken.
`BinOpToken` is badly named, because it only covers the assignable
binary ops and excludes comparisons and `&&`/`||`. Its use in
`ast::TokenKind` does allow a small amount of code sharing, but it's a
clumsy factoring.

This commit removes `ast::TokenKind::BinOp{,Eq}`, replacing each one
with 10 individual variants. This makes `ast::TokenKind` more similar to
`rustc_lexer::TokenKind`, which has individual variants for all
operators.

Although the number of lines of code increases, the number of chars
decreases due to the frequent use of shorter names like `token::Plus`
instead of `token::BinOp(BinOpToken::Plus)`.
2025-03-03 09:26:11 +11:00
..
mut_visit Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
tokenstream update cfg(bootstrap) 2025-01-08 21:26:39 +01:00
attr.rs Remove NtMeta. 2025-02-28 08:42:06 +11:00
attr_wrapper.rs Rustfmt 2025-02-08 22:12:13 +00:00
diagnostics.rs Replace ast::TokenKind::BinOp{,Eq} and remove BinOpToken. 2025-03-03 09:26:11 +11:00
expr.rs Replace ast::TokenKind::BinOp{,Eq} and remove BinOpToken. 2025-03-03 09:26:11 +11:00
generics.rs Stop using span hack for contracts feature gating 2025-02-10 19:51:26 +00:00
item.rs Replace ast::TokenKind::BinOp{,Eq} and remove BinOpToken. 2025-03-03 09:26:11 +11:00
mod.rs Replace ast::TokenKind::BinOp{,Eq} and remove BinOpToken. 2025-03-03 09:26:11 +11:00
nonterminal.rs Remove NtPath. 2025-02-28 08:42:14 +11:00
pat.rs Replace ast::TokenKind::BinOp{,Eq} and remove BinOpToken. 2025-03-03 09:26:11 +11:00
path.rs Replace ast::TokenKind::BinOp{,Eq} and remove BinOpToken. 2025-03-03 09:26:11 +11:00
stmt.rs Replace ast::TokenKind::BinOp{,Eq} and remove BinOpToken. 2025-03-03 09:26:11 +11:00
tests.rs Stop passing the same resource multiple times when building ParseSess 2025-02-06 17:30:10 +00:00
token_type.rs Replace ast::TokenKind::BinOp{,Eq} and remove BinOpToken. 2025-03-03 09:26:11 +11:00
ty.rs Replace ast::TokenKind::BinOp{,Eq} and remove BinOpToken. 2025-03-03 09:26:11 +11:00