From 09dbe5b736ba95ed96fa44f7a93ff61b3f6be3ee Mon Sep 17 00:00:00 2001 From: greg Date: Sun, 8 Sep 2019 04:27:04 -0700 Subject: [PATCH] Rename function --- schala-lang/language/src/scope_resolution.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/schala-lang/language/src/scope_resolution.rs b/schala-lang/language/src/scope_resolution.rs index da046e4..1734b9b 100644 --- a/schala-lang/language/src/scope_resolution.rs +++ b/schala-lang/language/src/scope_resolution.rs @@ -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, ) { + /// 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, ) { let inner_name = meta_qualified_name.node(); let fqsn = lookup_name_in_scope(inner_name); meta_qualified_name.fqsn = Some(fqsn);