Fix builds.

This commit is contained in:
Stephen Chung
2021-11-29 10:17:04 +08:00
parent 95dc2ad502
commit c5f2b0a253
9 changed files with 233 additions and 229 deletions

View File

@@ -3270,7 +3270,11 @@ impl Engine {
));
#[cfg(feature = "no_optimize")]
return Ok(AST::new(statements, crate::Module::new()));
return Ok(AST::new(
statements,
#[cfg(not(feature = "no_function"))]
crate::Module::new(),
));
}
/// Parse the global level statements.
@@ -3371,6 +3375,10 @@ impl Engine {
#[cfg(feature = "no_optimize")]
#[cfg(feature = "no_function")]
return Ok(AST::new(statements, crate::Module::new()));
return Ok(AST::new(
statements,
#[cfg(not(feature = "no_function"))]
crate::Module::new(),
));
}
}