mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-23 03:52:27 +00:00
Format crash
This commit is contained in:
parent
fee01166c7
commit
1011ce9fba
3 changed files with 43 additions and 1 deletions
|
@ -43,7 +43,8 @@ impl<'a> Formattable for Expr<'a> {
|
|||
| MalformedIdent(_, _)
|
||||
| MalformedClosure
|
||||
| Tag(_)
|
||||
| OpaqueRef(_) => false,
|
||||
| OpaqueRef(_)
|
||||
| Crash => false,
|
||||
|
||||
// These expressions always have newlines
|
||||
Defs(_, _) | When(_, _) => true,
|
||||
|
@ -191,6 +192,10 @@ impl<'a> Formattable for Expr<'a> {
|
|||
buf.push('_');
|
||||
buf.push_str(name);
|
||||
}
|
||||
Crash => {
|
||||
buf.indent(indent);
|
||||
buf.push_str("crash");
|
||||
}
|
||||
Apply(loc_expr, loc_args, _) => {
|
||||
buf.indent(indent);
|
||||
if apply_needs_parens && !loc_args.is_empty() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue