Split AST::set_source into set_source/clear_source.

This commit is contained in:
Stephen Chung
2021-01-09 15:20:07 +08:00
parent 1513e6ab6a
commit 637f47d259
5 changed files with 30 additions and 15 deletions

View File

@@ -212,7 +212,7 @@ impl ModuleResolver for FileModuleResolver {
_ => Box::new(EvalAltResult::ErrorInModule(path.to_string(), err, pos)),
})?;
ast.set_source(Some(path));
ast.set_source(path);
// Make a module from the AST
let m: Shared<Module> = Module::eval_ast_as_new(scope, &ast, engine)