Fix no_function build.
This commit is contained in:
@@ -7,10 +7,13 @@ use crate::engine::{
|
||||
};
|
||||
use crate::fn_native::FnPtr;
|
||||
use crate::module::Module;
|
||||
use crate::parser::{map_dynamic_to_expr, Expr, ReturnType, ScriptFnDef, Stmt, AST};
|
||||
use crate::parser::{map_dynamic_to_expr, Expr, ScriptFnDef, Stmt, AST};
|
||||
use crate::scope::{Entry as ScopeEntry, EntryType as ScopeEntryType, Scope};
|
||||
use crate::utils::StaticVec;
|
||||
|
||||
#[cfg(not(feature = "no_function"))]
|
||||
use crate::parser::ReturnType;
|
||||
|
||||
#[cfg(feature = "internals")]
|
||||
use crate::parser::CustomExpr;
|
||||
|
||||
@@ -749,7 +752,8 @@ pub fn optimize_into_ast(
|
||||
level
|
||||
};
|
||||
|
||||
let lib = if cfg!(not(feature = "no_function")) {
|
||||
#[cfg(not(feature = "no_function"))]
|
||||
let lib = {
|
||||
let mut module = Module::new();
|
||||
|
||||
if !level.is_none() {
|
||||
@@ -811,10 +815,11 @@ pub fn optimize_into_ast(
|
||||
}
|
||||
|
||||
module
|
||||
} else {
|
||||
Default::default()
|
||||
};
|
||||
|
||||
#[cfg(feature = "no_function")]
|
||||
let lib = Default::default();
|
||||
|
||||
AST::new(
|
||||
match level {
|
||||
OptimizationLevel::None => statements,
|
||||
|
Reference in New Issue
Block a user