Allow cross-loading of relative file paths in FileModuleResolver.

This commit is contained in:
Stephen Chung
2021-04-02 12:34:39 +08:00
parent 294d233c02
commit 889edbef71
16 changed files with 219 additions and 100 deletions

View File

@@ -25,6 +25,7 @@ pub trait ModuleResolver: SendSync {
fn resolve(
&self,
engine: &Engine,
source_path: Option<&str>,
path: &str,
pos: Position,
) -> Result<Shared<Module>, Box<EvalAltResult>>;
@@ -42,6 +43,7 @@ pub trait ModuleResolver: SendSync {
fn resolve_ast(
&self,
engine: &Engine,
source_path: Option<&str>,
path: &str,
pos: Position,
) -> Option<Result<AST, Box<EvalAltResult>>> {