rust/compiler/rustc_parse/src
Nicholas Nethercote ceafbad81f Introduce AssocOp::Binary.
It mirrors `ExprKind::Binary`, and contains a `BinOpKind`. This makes
`AssocOp` more like `ExprKind`. Note that the variants removed from
`AssocOp` are all named differently to `BinOpToken`, e.g. `Multiply`
instead of `Mul`, so that's an inconsistency removed.

The commit adds `precedence` and `fixity` methods to `BinOpKind`, and
calls them from the corresponding methods in `AssocOp`. This avoids the
need to create an `AssocOp` from a `BinOpKind` in a bunch of places, and
`AssocOp::from_ast_binop` is removed.

`AssocOp::to_ast_binop` is also no longer needed.

Overall things are shorter and nicer.
2025-02-27 09:53:17 +11:00
..
lexer replaces few consts with statics to reduce readonly section 2025-01-28 17:38:22 +03:00
parser Introduce AssocOp::Binary. 2025-02-27 09:53:17 +11:00
errors.rs Try to recover from path sep error in parser 2025-02-15 07:44:20 +08:00
lib.rs tree-wide: parallel: Fully removed all Lrc, replaced with Arc 2025-02-03 13:25:57 +03:00
validate_attr.rs Properly record metavar spans for other expansions other than TT 2024-12-21 20:37:27 +00:00