Make module_resolver optional and remove NullModuleResolver.

This commit is contained in:
Stephen Chung
2020-05-06 16:09:44 +08:00
parent c9571d375a
commit 88fec57394
8 changed files with 200 additions and 207 deletions

View File

@@ -1,4 +1,4 @@
use rhai::{Dynamic, Engine, EvalAltResult, Map, Scope, AST, INT};
use rhai::{Dynamic, Engine, EvalAltResult, Scope, AST, INT};
#[cfg(not(feature = "no_optimize"))]
use rhai::OptimizationLevel;
@@ -163,6 +163,7 @@ fn main() {
}
// Throw away all the statements, leaving only the functions
#[cfg(not(feature = "no_function"))]
main_ast.retain_functions();
}
}