mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
parse the region of the preceding comment for an expect
This commit is contained in:
parent
35733d51dc
commit
7597d11b59
8 changed files with 35 additions and 11 deletions
|
@ -158,7 +158,7 @@ impl<'a> Formattable for ValueDef<'a> {
|
|||
}
|
||||
Body(loc_pattern, loc_expr) => loc_pattern.is_multiline() || loc_expr.is_multiline(),
|
||||
AnnotatedBody { .. } => true,
|
||||
Expect(loc_expr) => loc_expr.is_multiline(),
|
||||
Expect { condition, .. } => condition.is_multiline(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -232,7 +232,7 @@ impl<'a> Formattable for ValueDef<'a> {
|
|||
Body(loc_pattern, loc_expr) => {
|
||||
fmt_body(buf, &loc_pattern.value, &loc_expr.value, indent);
|
||||
}
|
||||
Expect(condition) => fmt_expect(buf, condition, self.is_multiline(), indent),
|
||||
Expect { condition, .. } => fmt_expect(buf, condition, self.is_multiline(), indent),
|
||||
AnnotatedBody {
|
||||
ann_pattern,
|
||||
ann_type,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue