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

@@ -84,7 +84,8 @@ fn test_functions_global_module() -> Result<(), Box<EvalAltResult>> {
42
);
assert!(matches!(*engine.run("
assert!(matches!(*engine.run(
"
fn foo() { global::ANSWER }
{
@@ -104,7 +105,8 @@ fn test_functions_global_module() -> Result<(), Box<EvalAltResult>> {
);
#[cfg(not(feature = "no_closure"))]
assert!(matches!(*engine.run("
assert!(matches!(*engine.run(
"
do_stuff(|| {
const LOCAL_VALUE = 42;
global::LOCAL_VALUE