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

@@ -30,7 +30,8 @@ fn test_mismatched_op_custom_type() -> Result<(), Box<EvalAltResult>> {
.register_type_with_name::<TestStruct>("TestStruct")
.register_fn("new_ts", TestStruct::new);
assert!(matches!(*engine.eval::<bool>("
assert!(matches!(*engine.eval::<bool>(
"
let x = new_ts();
let y = new_ts();
x == y