Rename EvalState to Caches.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
//! Module that defines the public evaluation API of [`Engine`].
|
||||
|
||||
use crate::eval::{EvalState, GlobalRuntimeState};
|
||||
use crate::eval::{Caches, GlobalRuntimeState};
|
||||
use crate::parser::ParseState;
|
||||
use crate::{Engine, Module, RhaiResultOf, Scope, AST};
|
||||
#[cfg(feature = "no_std")]
|
||||
@@ -43,7 +43,7 @@ impl Engine {
|
||||
/// Evaluate an [`AST`] with own scope, returning any error (if any).
|
||||
#[inline]
|
||||
pub fn run_ast_with_scope(&self, scope: &mut Scope, ast: &AST) -> RhaiResultOf<()> {
|
||||
let state = &mut EvalState::new();
|
||||
let caches = &mut Caches::new();
|
||||
let global = &mut GlobalRuntimeState::new(self);
|
||||
global.source = ast.source_raw().clone();
|
||||
|
||||
@@ -63,7 +63,7 @@ impl Engine {
|
||||
} else {
|
||||
&lib
|
||||
};
|
||||
self.eval_global_statements(scope, global, state, statements, lib, 0)?;
|
||||
self.eval_global_statements(scope, global, caches, statements, lib, 0)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
Reference in New Issue
Block a user