Move lib into global.

This commit is contained in:
Stephen Chung
2022-11-10 11:49:10 +08:00
parent 3800a6d9f5
commit 3a028f2642
19 changed files with 353 additions and 500 deletions

View File

@@ -52,7 +52,7 @@ impl Engine {
let mut ast = ast;
#[cfg(not(feature = "no_function"))]
let lib = ast
let functions = ast
.shared_lib()
.iter_fn()
.filter(|f| f.func.is_script())
@@ -64,7 +64,7 @@ impl Engine {
scope,
ast.take_statements(),
#[cfg(not(feature = "no_function"))]
lib,
functions,
optimization_level,
);