use record for PrecedenceConflict

This commit is contained in:
Folkert 2021-03-20 15:07:15 +01:00
parent c2da776ff4
commit d22acb521e
6 changed files with 27 additions and 16 deletions

View file

@ -155,7 +155,12 @@ pub enum Expr<'a> {
MalformedClosure,
// Both operators were non-associative, e.g. (True == False == False).
// We should tell the author to disambiguate by grouping them with parens.
PrecedenceConflict(Region, Loc<BinOp>, Loc<BinOp>, &'a Loc<Expr<'a>>),
PrecedenceConflict {
whole_region: Region,
binop1: Loc<BinOp>,
binop2: Loc<BinOp>,
expr: &'a Loc<Expr<'a>>,
},
}
#[derive(Debug, Clone, PartialEq)]