Rename function
This commit is contained in:
parent
cfa65e5339
commit
09dbe5b736
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user