mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Support '??' syntax for optional record fields
This commit is contained in:
parent
3d4dd5b583
commit
a24fe430b4
21 changed files with 42 additions and 43 deletions
|
@ -701,16 +701,8 @@ fn fmt_apply(
|
|||
if !expr.before.is_empty() {
|
||||
format_spaces(buf, expr.before, Newlines::Yes, indent);
|
||||
}
|
||||
expr.item.format_with_options(
|
||||
buf,
|
||||
if use_commas_and_parens {
|
||||
Parens::NotNeeded
|
||||
} else {
|
||||
Parens::InApply
|
||||
},
|
||||
Newlines::Yes,
|
||||
indent,
|
||||
);
|
||||
expr.item
|
||||
.format_with_options(buf, Parens::InApply, Newlines::Yes, indent);
|
||||
|
||||
if use_commas_and_parens {
|
||||
buf.push('(');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue