Split Engine into eval folder.

This commit is contained in:
Stephen Chung
2022-01-07 11:43:47 +08:00
parent ad0f7b7ce9
commit a267ac5e54
22 changed files with 3413 additions and 3299 deletions

View File

@@ -1,7 +1,7 @@
//! Module that defines the `call_fn` API of [`Engine`].
#![cfg(not(feature = "no_function"))]
use crate::engine::{EvalState, GlobalRuntimeState};
use crate::eval::{EvalState, GlobalRuntimeState};
use crate::types::dynamic::Variant;
use crate::{
Dynamic, Engine, FuncArgs, Position, RhaiResult, RhaiResultOf, Scope, StaticVec, AST, ERR,

View File

@@ -1,14 +1,14 @@
//! Module implementing custom syntax for [`Engine`].
use crate::ast::Expr;
use crate::engine::EvalContext;
use crate::func::native::SendSync;
use crate::parser::ParseResult;
use crate::r#unsafe::unsafe_try_cast;
use crate::tokenizer::{is_valid_identifier, Token};
use crate::types::dynamic::Variant;
use crate::{
Engine, Identifier, ImmutableString, LexError, Position, RhaiResult, Shared, StaticVec, INT,
Engine, EvalContext, Identifier, ImmutableString, LexError, Position, RhaiResult, Shared,
StaticVec, INT,
};
#[cfg(feature = "no_std")]
use std::prelude::v1::*;

View File

@@ -1,6 +1,6 @@
//! Module that defines the public evaluation API of [`Engine`].
use crate::engine::{EvalState, GlobalRuntimeState};
use crate::eval::{EvalState, GlobalRuntimeState};
use crate::parser::ParseState;
use crate::types::dynamic::Variant;
use crate::{Dynamic, Engine, Module, Position, RhaiResult, RhaiResultOf, Scope, AST, ERR};

View File

@@ -1,8 +1,7 @@
//! Module that defines public event handlers for [`Engine`].
use crate::engine::EvalContext;
use crate::func::SendSync;
use crate::{Dynamic, Engine, Position, RhaiResultOf};
use crate::{Dynamic, Engine, EvalContext, Position, RhaiResultOf};
#[cfg(feature = "no_std")]
use std::prelude::v1::*;

View File

@@ -1,6 +1,6 @@
//! Module that defines the public evaluation API of [`Engine`].
use crate::engine::{EvalState, GlobalRuntimeState};
use crate::eval::{EvalState, GlobalRuntimeState};
use crate::parser::ParseState;
use crate::{Engine, Module, RhaiResultOf, Scope, AST};
#[cfg(feature = "no_std")]