Fix build.

This commit is contained in:
Stephen Chung
2022-04-26 18:32:43 +08:00
parent 2889ca0988
commit 98e0042214
2 changed files with 17 additions and 12 deletions

View File

@@ -68,7 +68,10 @@ impl Engine {
#[cfg(feature = "debugging")]
if self.debugger.is_some() {
global.debugger.status = crate::eval::DebuggerStatus::Terminate;
let lib = &[ast.as_ref()];
let lib = &[
#[cfg(not(feature = "no_function"))]
ast.as_ref(),
];
let node = &crate::ast::Stmt::Noop(crate::Position::NONE);
self.run_debugger(scope, global, lib, &mut None, node, 0)?;
}