Support call stack and FunctionExit for native functions.

This commit is contained in:
Stephen Chung
2022-02-02 14:47:35 +08:00
parent 7163a7331a
commit 4a80483749
13 changed files with 190 additions and 77 deletions

View File

@@ -18,7 +18,7 @@ fn test_debugging() -> Result<(), Box<EvalAltResult>> {
"
fn foo(x) {
if x >= 5 {
stack_trace()
back_trace()
} else {
foo(x+1)
}
@@ -30,7 +30,7 @@ fn test_debugging() -> Result<(), Box<EvalAltResult>> {
assert_eq!(r.len(), 6);
assert_eq!(engine.eval::<INT>("len(stack_trace())")?, 0);
assert_eq!(engine.eval::<INT>("len(back_trace())")?, 0);
}
Ok(())