Rename function

This commit is contained in:
greg 2019-09-08 04:27:04 -07:00
parent cfa65e5339
commit 09dbe5b736

View File

@ -94,25 +94,26 @@ impl ScopeResolver {
},
Literal(_) => (),
TupleStruct(name, patterns) => {
self.qualified_name(name);
self.qualified_name_in_pattern(name);
for pat in patterns {
self.pattern(pat)?;
}
},
Record(name, key_patterns) => {
self.qualified_name(name);
self.qualified_name_in_pattern(name);
for (_, pat) in key_patterns {
self.pattern(pat)?;
}
},
VarOrName(name) => {
self.qualified_name(name);
self.qualified_name_in_pattern(name);
},
};
Ok(())
}
fn qualified_name(&mut self, meta_qualified_name: &mut Meta<QualifiedName>, ) {
/// this might be a variable or a pattern. if a variable, set to none
fn qualified_name_in_pattern(&mut self, meta_qualified_name: &mut Meta<QualifiedName>, ) {
let inner_name = meta_qualified_name.node();
let fqsn = lookup_name_in_scope(inner_name);
meta_qualified_name.fqsn = Some(fqsn);