mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 00:01:16 +00:00
Make Expr::List use a Collection
This commit is contained in:
parent
a4ca6a31a6
commit
d63405d824
8 changed files with 29 additions and 67 deletions
|
@ -127,10 +127,7 @@ pub enum Expr<'a> {
|
|||
AccessorFunction(&'a str),
|
||||
|
||||
// Collection Literals
|
||||
List {
|
||||
items: &'a [&'a Loc<Expr<'a>>],
|
||||
final_comments: &'a [CommentOrNewline<'a>],
|
||||
},
|
||||
List(Collection<'a, &'a Loc<Expr<'a>>>),
|
||||
|
||||
RecordUpdate {
|
||||
update: &'a Loc<Expr<'a>>,
|
||||
|
|
|
@ -2173,10 +2173,10 @@ fn list_literal_help<'a>(min_indent: u16) -> impl Parser<'a, Expr<'a>, EList<'a>
|
|||
allocated.push(parsed_elem);
|
||||
}
|
||||
|
||||
let expr = Expr::List {
|
||||
let expr = Expr::List(Collection {
|
||||
items: allocated.into_bump_slice(),
|
||||
final_comments: elements.final_comments,
|
||||
};
|
||||
});
|
||||
|
||||
Ok((MadeProgress, expr, state))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue