mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
correctly parse trailing commas in record
This commit is contained in:
parent
7ec161c415
commit
58acc59b01
8 changed files with 135 additions and 57 deletions
|
@ -208,7 +208,7 @@ pub fn canonicalize_expr<'a>(
|
|||
ast::Expr::Record {
|
||||
fields,
|
||||
update: Some(loc_update),
|
||||
trailing_comma: _,
|
||||
final_comments: _,
|
||||
} => {
|
||||
let (can_update, update_out) =
|
||||
canonicalize_expr(env, var_store, scope, loc_update.region, &loc_update.value);
|
||||
|
@ -256,7 +256,7 @@ pub fn canonicalize_expr<'a>(
|
|||
ast::Expr::Record {
|
||||
fields,
|
||||
update: None,
|
||||
trailing_comma: _,
|
||||
final_comments: _,
|
||||
} => {
|
||||
if fields.is_empty() {
|
||||
(EmptyRecord, Output::default())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue