mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
add dedicated RecordUpdate tag to parse ast
This commit is contained in:
parent
0e7106280c
commit
60265b5d2a
5 changed files with 97 additions and 0 deletions
|
@ -98,6 +98,7 @@ impl<'a> Formattable<'a> for Expr<'a> {
|
|||
}
|
||||
|
||||
Record { fields, .. } => fields.iter().any(|loc_field| loc_field.is_multiline()),
|
||||
RecordUpdate { fields, .. } => fields.iter().any(|loc_field| loc_field.is_multiline()),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -247,6 +248,13 @@ impl<'a> Formattable<'a> for Expr<'a> {
|
|||
} => {
|
||||
fmt_record(buf, *update, fields, final_comments, indent);
|
||||
}
|
||||
RecordUpdate {
|
||||
fields,
|
||||
update,
|
||||
final_comments,
|
||||
} => {
|
||||
fmt_record(buf, Some(*update), fields, final_comments, indent);
|
||||
}
|
||||
Closure(loc_patterns, loc_ret) => {
|
||||
fmt_closure(buf, loc_patterns, loc_ret, indent);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue