Add ParseError:err_type and ParseError::position.

This commit is contained in:
Stephen Chung
2022-07-29 09:42:30 +08:00
parent 6fab9f5b63
commit ea38185cac
19 changed files with 147 additions and 104 deletions

View File

@@ -65,12 +65,12 @@ fn test_fn_ptr() -> Result<(), Box<EvalAltResult>> {
*engine
.eval::<INT>(
r#"
fn foo(x) { this += x; }
fn foo(x) { this += x; }
let f = Fn("foo");
call(f, 2);
x
"#
let f = Fn("foo");
call(f, 2);
x
"#
)
.expect_err("should error"),
EvalAltResult::ErrorInFunctionCall(fn_name, _, err, ..)