mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
access record fields progress
This commit is contained in:
parent
8e11d69c45
commit
bfd9150af4
4 changed files with 62 additions and 33 deletions
|
@ -101,6 +101,7 @@ pub enum Expr<'a> {
|
|||
label: Lowercase,
|
||||
field_layout: Layout<'a>,
|
||||
struct_layout: Layout<'a>,
|
||||
record: &'a Expr<'a>,
|
||||
},
|
||||
|
||||
Array {
|
||||
|
@ -398,7 +399,7 @@ fn from_can<'a>(
|
|||
ext_var,
|
||||
field_var,
|
||||
field,
|
||||
..
|
||||
loc_expr,
|
||||
} => {
|
||||
let subs = env.subs;
|
||||
let arena = env.arena;
|
||||
|
@ -419,10 +420,13 @@ fn from_can<'a>(
|
|||
}
|
||||
};
|
||||
|
||||
let record = arena.alloc(from_can(env, loc_expr.value, procs, None));
|
||||
|
||||
Expr::Access {
|
||||
label: field,
|
||||
field_layout,
|
||||
struct_layout,
|
||||
record,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue