mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
use new binops
This commit is contained in:
parent
e0c211081a
commit
d5ec66244f
5 changed files with 295 additions and 15 deletions
|
@ -74,6 +74,11 @@ impl<'a> Formattable<'a> for Expr<'a> {
|
|||
next_is_multiline_bin_op || loc_left.is_multiline() || loc_right.is_multiline()
|
||||
}
|
||||
|
||||
BinOps(lefts, loc_right) => {
|
||||
lefts.iter().any(|(loc_expr, _)| loc_expr.is_multiline())
|
||||
|| loc_right.is_multiline()
|
||||
}
|
||||
|
||||
UnaryOp(loc_subexpr, _)
|
||||
| PrecedenceConflict(roc_parse::ast::PrecedenceConflict {
|
||||
expr: loc_subexpr, ..
|
||||
|
@ -298,6 +303,7 @@ impl<'a> Formattable<'a> for Expr<'a> {
|
|||
parens,
|
||||
indent,
|
||||
),
|
||||
BinOps(_, _) => todo!(),
|
||||
UnaryOp(sub_expr, unary_op) => {
|
||||
match &unary_op.value {
|
||||
operator::UnaryOp::Negate => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue