mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
use record for PrecedenceConflict
This commit is contained in:
parent
c2da776ff4
commit
d22acb521e
6 changed files with 27 additions and 16 deletions
|
@ -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)]
|
||||
|
|
|
@ -1389,7 +1389,7 @@ fn expr_to_pattern_help<'a>(arena: &'a Bump, expr: &Expr<'a>) -> Result<Pattern<
|
|||
| Expr::If(_, _)
|
||||
| Expr::When(_, _)
|
||||
| Expr::MalformedClosure
|
||||
| Expr::PrecedenceConflict(_, _, _, _)
|
||||
| Expr::PrecedenceConflict { .. }
|
||||
| Expr::Record {
|
||||
update: Some(_), ..
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue