Allow AST optimization based on external Scope.

This commit is contained in:
Stephen Chung
2020-03-14 14:30:44 +08:00
parent 9844ae8665
commit b3a22d942a
6 changed files with 222 additions and 55 deletions

View File

@@ -73,7 +73,7 @@ fn main() {
}
if let Err(err) = engine
.compile(&input)
.compile_with_scope(&scope, &input)
.map_err(EvalAltResult::ErrorParsing)
.and_then(|r| {
ast = Some(r);