Merge branch 'namespace'

This commit is contained in:
Stephen Chung
2020-05-07 09:32:00 +08:00
3 changed files with 123 additions and 5 deletions

View File

@@ -740,6 +740,15 @@ mod file {
pub fn new() -> Self {
Default::default()
}
/// Create a `Module` from a file path.
pub fn create_module<P: Into<PathBuf>>(
&self,
engine: &Engine,
path: &str,
) -> Result<Module, Box<EvalAltResult>> {
self.resolve(engine, path, Default::default())
}
}
impl ModuleResolver for FileModuleResolver {