Add NativeCallContext::position.

This commit is contained in:
Stephen Chung
2021-11-05 19:35:33 +08:00
parent ff9ac41da2
commit affbb81d8a
6 changed files with 57 additions and 18 deletions

View File

@@ -338,7 +338,7 @@ fn test_closures_external() -> Result<(), Box<EvalAltResult>> {
// Create native call context
let fn_name = fn_ptr.fn_name().to_string();
let context = NativeCallContext::new(&engine, &fn_name, &lib);
let context = NativeCallContext::new(&engine, &fn_name, &lib, rhai::Position::NONE);
// Closure 'f' captures: the engine, the AST, and the curried function pointer
let f = move |x: INT| fn_ptr.call_dynamic(&context, None, [x.into()]);