Implement module-qualified functions.

This commit is contained in:
Stephen Chung
2020-05-05 17:51:40 +08:00
parent 38e717a838
commit aae9e43109
5 changed files with 329 additions and 63 deletions

View File

@@ -172,7 +172,7 @@ impl<'a> Scope<'a> {
/// Add (push) a new module to the Scope.
///
/// Modules are used for accessing member variables, functions and plugins under a namespace.
pub(crate) fn push_module<K: Into<Cow<'a, str>>>(&mut self, name: K, value: Module) {
pub fn push_module<K: Into<Cow<'a, str>>>(&mut self, name: K, value: Module) {
self.push_dynamic_value(
name,
EntryType::Module,