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

@@ -92,7 +92,7 @@ fn main() {
.compile(&contents)
.map_err(|err| err.into())
.and_then(|mut ast| {
ast.set_source(Some(&filename));
ast.set_source(&filename);
Module::eval_ast_as_new(Default::default(), &ast, &engine)
}) {
Err(err) => {