Merge restore_state and rewind_scope.

This commit is contained in:
Stephen Chung
2021-12-28 17:50:49 +08:00
parent 5b667a69b7
commit cbaf095c7a
4 changed files with 26 additions and 36 deletions

View File

@@ -18,9 +18,9 @@ fn test_eval_blocks() -> Result<(), Box<EvalAltResult>> {
r#"
let x = 999;
eval("let x = x + 123");
eval("let x = x - 1000");
let y = if x > 0 {
let y = if x < 0 {
eval("let x = 42");
x
} else {
@@ -30,7 +30,7 @@ fn test_eval_blocks() -> Result<(), Box<EvalAltResult>> {
x + y
"#
)?,
1164
41
);
Ok(())