mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 23:04:49 +00:00
fix compile issues
This commit is contained in:
parent
07d4f8dc15
commit
4e9387cbda
4 changed files with 35 additions and 14 deletions
|
@ -109,14 +109,24 @@ pub fn desugar_expr<'a>(arena: &'a Bump, loc_expr: &'a Located<Expr<'a>>) -> &'a
|
|||
|
||||
arena.alloc(Located { region, value })
|
||||
}
|
||||
List(elems) | Nested(List(elems)) => {
|
||||
let mut new_elems = Vec::with_capacity_in(elems.len(), arena);
|
||||
List {
|
||||
items,
|
||||
final_comments,
|
||||
}
|
||||
| Nested(List {
|
||||
items,
|
||||
final_comments,
|
||||
}) => {
|
||||
let mut new_items = Vec::with_capacity_in(items.len(), arena);
|
||||
|
||||
for elem in elems.iter() {
|
||||
new_elems.push(desugar_expr(arena, elem));
|
||||
for item in items.iter() {
|
||||
new_items.push(desugar_expr(arena, item));
|
||||
}
|
||||
let new_elems = new_elems.into_bump_slice();
|
||||
let value: Expr<'a> = List(new_elems);
|
||||
let new_items = new_items.into_bump_slice();
|
||||
let value: Expr<'a> = List {
|
||||
items: new_items,
|
||||
final_comments,
|
||||
};
|
||||
|
||||
arena.alloc(Located {
|
||||
region: loc_expr.region,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue