mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
add TrailingComma to Record & little formatter refactor
This commit is contained in:
parent
a788407caa
commit
6ad1bb233a
6 changed files with 84 additions and 54 deletions
|
@ -208,6 +208,7 @@ pub fn canonicalize_expr<'a>(
|
|||
ast::Expr::Record {
|
||||
fields,
|
||||
update: Some(loc_update),
|
||||
trailing_comma: _,
|
||||
} => {
|
||||
let (can_update, update_out) =
|
||||
canonicalize_expr(env, var_store, scope, loc_update.region, &loc_update.value);
|
||||
|
@ -255,6 +256,7 @@ pub fn canonicalize_expr<'a>(
|
|||
ast::Expr::Record {
|
||||
fields,
|
||||
update: None,
|
||||
trailing_comma: _,
|
||||
} => {
|
||||
if fields.is_empty() {
|
||||
(EmptyRecord, Output::default())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue