mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
WIP try simplification
This commit is contained in:
parent
85b76a14b4
commit
8b9e08bd76
13 changed files with 734 additions and 551 deletions
|
@ -31,6 +31,8 @@ impl<'a> Formattable for Expr<'a> {
|
|||
true
|
||||
}
|
||||
|
||||
MalformedSuffixed(loc_expr) => loc_expr.is_multiline(),
|
||||
|
||||
// These expressions never have newlines
|
||||
Float(..)
|
||||
| Num(..)
|
||||
|
@ -562,6 +564,10 @@ impl<'a> Formattable for Expr<'a> {
|
|||
buf.indent(indent);
|
||||
buf.push_str(str)
|
||||
}
|
||||
MalformedSuffixed(loc_expr) => {
|
||||
buf.indent(indent);
|
||||
loc_expr.format_with_options(buf, parens, newlines, indent);
|
||||
}
|
||||
MalformedClosure => {}
|
||||
PrecedenceConflict { .. } => {}
|
||||
MultipleRecordBuilders { .. } => {}
|
||||
|
|
|
@ -764,6 +764,7 @@ impl<'a> RemoveSpaces<'a> for Expr<'a> {
|
|||
}
|
||||
Expr::MalformedIdent(a, b) => Expr::MalformedIdent(a, remove_spaces_bad_ident(b)),
|
||||
Expr::MalformedClosure => Expr::MalformedClosure,
|
||||
Expr::MalformedSuffixed(a) => Expr::MalformedSuffixed(a),
|
||||
Expr::PrecedenceConflict(a) => Expr::PrecedenceConflict(a),
|
||||
Expr::MultipleRecordBuilders(a) => Expr::MultipleRecordBuilders(a),
|
||||
Expr::UnappliedRecordBuilder(a) => Expr::UnappliedRecordBuilder(a),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue