fn resolve_name_in_module(&mut self,
                              module: Module<'a>,
                              name: Name,
                              namespace: Namespace,
                              use_lexical_scope: bool,
                              record_used: bool)
                              -> ResolveResult<&'a NameBinding<'a>> {
        debug!("(resolving name in module) resolving `{}` in `{}`", name, module_to_string(module));

        self.populate_module_if_necessary(module);
        module.resolve_name(name, namespace, use_lexical_scope).and_then(|binding| {
            if record_used {
                if let NameBindingKind::Import { directive, .. } = binding.kind {
                    self.used_imports.insert((directive.id, namespace));
                }
                self.record_use(name, binding);
            }
            Success(binding)
        })
    }
/// Attempts to resolve the supplied name in the given module for the
/// given namespace. If successful, returns the binding corresponding to
/// the name.
Attempts to resolve the supplied name in the given module for the
given namespace. If successful, returns the binding corresponding to
the name.
Attempts to resolve the supplied name in the given module for the given namespace . If successful returns the binding corresponding to the name .
fn resolve_name_in_module(&mut self,
                              module: Module<'a>,
                              name: Name,
                              namespace: Namespace,
                              use_lexical_scope: bool,
                              record_used: bool)
                              -> ResolveResult<&'a NameBinding<'a>> {
        debug!("(resolving name in module) resolving `{}` in `{}`", name, module_to_string(module));
        self.populate_module_if_necessary(module);
        module.resolve_name(name, namespace, use_lexical_scope).and_then(|binding| {
            if record_used {
                if let NameBindingKind::Import { directive, .. } = binding.kind {
                    self.used_imports.insert((directive.id, namespace));
                }
                self.record_use(name, binding);
            }
            Success(binding)
        })
    }
fn resolve_name_in_module ( & mut self , module : Module < ' a > , name : Name , namespace : Namespace , use_lexical_scope : bool , record_used : bool ) -> ResolveResult < & ' a NameBinding < ' a > > { debug ! ( " " name module_to_string ( module ) ) ; self . populate_module_if_necessary ( module ) ; module . resolve_name ( name , namespace , use_lexical_scope ) . and_then ( | binding | { if record_used { if let NameBindingKind :: Import { directive , .. } = binding . kind { self . used_imports . insert ( ( directive . id , namespace ) ) ; } self . record_use ( name , binding ) ; } Success ( binding ) } ) }
Attempts to resolve the supplied name in the given module for the
given namespace.
Attempts to resolve the supplied name in the given module for the given namespace .
&mut self
module
Module<'a>
name
Name
namespace
Namespace
use_lexical_scope
bool
record_used
bool
&mut self
module
Module<'a>
name
Name
namespace
Namespace
use_lexical_scope
bool
record_used
bool