Make sure the global namespace is always searched first.

This commit is contained in:
Stephen Chung
2021-11-05 23:22:05 +08:00
parent 46e99df9cd
commit eeca8c90aa
20 changed files with 82 additions and 11 deletions

View File

@@ -131,6 +131,8 @@ pub struct Module {
id: Option<Identifier>,
/// Is this module internal?
pub(crate) internal: bool,
/// Is this module part of a standard library?
pub(crate) standard: bool,
/// Sub-modules.
modules: BTreeMap<Identifier, Shared<Module>>,
/// [`Module`] variables.
@@ -246,6 +248,7 @@ impl Module {
Self {
id: None,
internal: false,
standard: false,
modules: Default::default(),
variables: Default::default(),
all_variables: Default::default(),