Bit of work for record patterns

This commit is contained in:
Greg Shuflin 2021-10-26 14:53:28 -07:00
parent 8896b1a7a7
commit e4592ddfb2

View File

@ -356,9 +356,13 @@ impl ast::Pattern {
spec => return Err(format!("Unexpected VarOrName symbol: {:?}", spec).into()) spec => return Err(format!("Unexpected VarOrName symbol: {:?}", spec).into())
} }
}, },
ast::Pattern::Record(_name, _members/*Vec<(Rc<String>, Pattern)>*/) => { ast::Pattern::Record(name, _specified_members/*Vec<(Rc<String>, Pattern)>*/) => {
unimplemented!() let symbol = symbol_table.lookup_symbol(&name.id).unwrap();
}, match symbol.spec() {
SymbolSpec::RecordConstructor { index: _, members: _, type_id: _ } => unimplemented!(),
spec => return Err(format!("Unexpected Record pattern symbol: {:?}", spec).into())
}
}
}) })
} }
} }