Add custom state.

This commit is contained in:
Stephen Chung
2022-05-02 00:03:45 +08:00
parent 98e0042214
commit c69f98c2c4
13 changed files with 91 additions and 46 deletions

View File

@@ -161,7 +161,7 @@ impl Engine {
level,
};
let var_name = expr.get_variable_name(true).expect("`Expr::Variable`");
match resolve_var(var_name, index, &context) {
match resolve_var(var_name, index, context) {
Ok(Some(mut result)) => {
result.set_access_mode(AccessMode::ReadOnly);
return Ok((result.into(), var_pos));