Skip transitive nodes for debugger.

This commit is contained in:
Stephen Chung 2022-01-26 22:15:47 +08:00
parent 538af8caee
commit edcc95e205

View File

@ -383,6 +383,12 @@ impl Engine {
if let Some(ref on_debugger) = self.debugger {
let node = node.into();
// Skip transitive nodes
match node {
ASTNode::Expr(Expr::Stmt(_)) | ASTNode::Stmt(Stmt::Expr(_)) => return Ok(None),
_ => (),
}
let stop = match global.debugger.status {
DebuggerCommand::Continue => false,
DebuggerCommand::Next => matches!(node, ASTNode::Stmt(_)),