Merge branch 'main' into format-invisible-chars

This commit is contained in:
Joshua Warner 2024-08-17 10:22:40 -07:00 committed by GitHub
commit 6b6968632f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 384 additions and 178 deletions

View file

@ -39,6 +39,7 @@ impl<'a> Formattable for Expr<'a> {
| NonBase10Int { .. }
| SingleQuote(_)
| AccessorFunction(_)
| RecordUpdater(_)
| Var { .. }
| Underscore { .. }
| MalformedIdent(_, _)
@ -510,6 +511,11 @@ impl<'a> Formattable for Expr<'a> {
Accessor::TupleIndex(key) => buf.push_str(key),
}
}
RecordUpdater(key) => {
buf.indent(indent);
buf.push('&');
buf.push_str(key);
}
RecordAccess(expr, key) => {
expr.format_with_options(buf, Parens::InApply, Newlines::Yes, indent);
buf.push('.');