initial pvn module implementation

This commit is contained in:
Adrian Malacoda
2017-02-19 04:49:06 -06:00
parent 84d2921f8f
commit c5a88b8405
4 changed files with 167 additions and 0 deletions

View File

@ -10,6 +10,7 @@ use modules::lua::LuaModule;
use modules::stdin::StdinModule;
use modules::echo::EchoModule;
use modules::random::RandomModule;
use modules::pvn::PvnModule;
pub struct ModuleLoader {
types: BTreeMap<&'static str, fn(&Table) -> Box<Module>>
@ -23,6 +24,7 @@ impl ModuleLoader {
types.insert("stdin", StdinModule::new as fn(&Table) -> Box<Module>);
types.insert("echo", EchoModule::new as fn(&Table) -> Box<Module>);
types.insert("random", RandomModule::new as fn(&Table) -> Box<Module>);
types.insert("pvn", PvnModule::new as fn(&Table) -> Box<Module>);
ModuleLoader {
types: types
}