Tuple field access #59

This commit is contained in:
2026-06-04 18:14:52 +02:00
parent d3b54b4114
commit d4dc1571b2
4 changed files with 24 additions and 2 deletions
+8
View File
@@ -153,6 +153,14 @@ impl GenRust for Vec<Prefix> {
impl GenRust for Postfix {
fn gen_rust(&self, ctx: &mut Context, cg: &mut RustCodegen) {
match self {
Postfix::TupleFieldAccess(field, generics) => cg.add(&format!(
".{}{}",
field,
generics
.iter()
.map(|v| format!("::{}", v.get_rust()))
.collect::<String>()
)),
Postfix::FieldAccess(field, generics) => cg.add(&format!(
".{}{}",
field.get_rust(),