Merge branch 'trunk' of github.com:rtfeldman/roc into format-precedence-conflict

This commit is contained in:
Chad Stearns 2020-04-13 22:30:34 -04:00
commit 3f7d1cf33a
108 changed files with 20538 additions and 4064 deletions

View file

@ -89,7 +89,7 @@ pub fn fmt_expr<'a>(
}
buf.push_str("\"\"\"");
}
Int(string) | Float(string) | GlobalTag(string) | PrivateTag(string) => {
Num(string) | Float(string) | GlobalTag(string) | PrivateTag(string) => {
buf.push_str(string)
}
NonBase10Int {
@ -440,7 +440,7 @@ pub fn is_multiline_pattern<'a>(pattern: &'a Pattern<'a>) -> bool {
| Pattern::Apply(_, _)
| Pattern::RecordDestructure(_)
| Pattern::RecordField(_, _)
| Pattern::IntLiteral(_)
| Pattern::NumLiteral(_)
| Pattern::NonBase10Literal { .. }
| Pattern::FloatLiteral(_)
| Pattern::StrLiteral(_)
@ -464,7 +464,7 @@ pub fn is_multiline_expr<'a>(expr: &'a Expr<'a>) -> bool {
// These expressions never have newlines
Float(_)
| Int(_)
| Num(_)
| NonBase10Int { .. }
| Str(_)
| Access(_, _)
@ -505,7 +505,7 @@ pub fn is_multiline_expr<'a>(expr: &'a Expr<'a>) -> bool {
|| next_is_multiline_bin_op
}
UnaryOp(loc_subexpr, _) | PrecedenceConflict(_, _, loc_subexpr) => {
UnaryOp(loc_subexpr, _) | PrecedenceConflict(_, _, _, loc_subexpr) => {
is_multiline_expr(&loc_subexpr.value)
}