Code structure refactor.
This commit is contained in:
29
src/lib.rs
29
src/lib.rs
@@ -83,6 +83,24 @@ mod token;
|
||||
mod r#unsafe;
|
||||
mod utils;
|
||||
|
||||
/// The system integer type.
|
||||
///
|
||||
/// If the `only_i32` feature is enabled, this will be `i32` instead.
|
||||
#[cfg(not(feature = "only_i32"))]
|
||||
pub type INT = i64;
|
||||
|
||||
/// The system integer type.
|
||||
///
|
||||
/// If the `only_i32` feature is not enabled, this will be `i64` instead.
|
||||
#[cfg(feature = "only_i32")]
|
||||
pub type INT = i32;
|
||||
|
||||
/// The system floating-point type.
|
||||
///
|
||||
/// Not available under the `no_float` feature.
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
pub type FLOAT = f64;
|
||||
|
||||
pub use ast::AST;
|
||||
pub use dynamic::Dynamic;
|
||||
pub use engine::{Engine, EvalContext};
|
||||
@@ -90,11 +108,11 @@ pub use fn_native::{FnPtr, NativeCallContext};
|
||||
pub use fn_register::{RegisterFn, RegisterResultFn};
|
||||
pub use module::Module;
|
||||
pub use parse_error::{ParseError, ParseErrorType};
|
||||
pub use parser::{ImmutableString, INT};
|
||||
pub use result::EvalAltResult;
|
||||
pub use scope::Scope;
|
||||
pub use syntax::Expression;
|
||||
pub use token::Position;
|
||||
pub use utils::ImmutableString;
|
||||
|
||||
#[cfg(feature = "internals")]
|
||||
pub use utils::{calc_native_fn_hash, calc_script_fn_hash};
|
||||
@@ -105,9 +123,7 @@ pub(crate) use utils::{calc_native_fn_hash, calc_script_fn_hash};
|
||||
pub use rhai_codegen::*;
|
||||
|
||||
#[cfg(not(feature = "no_function"))]
|
||||
pub use parser::FnAccess;
|
||||
#[cfg(feature = "no_function")]
|
||||
pub use parser::FnAccess;
|
||||
pub use ast::FnAccess;
|
||||
|
||||
#[cfg(not(feature = "no_function"))]
|
||||
pub use fn_func::Func;
|
||||
@@ -118,9 +134,6 @@ pub use engine::Array;
|
||||
#[cfg(not(feature = "no_object"))]
|
||||
pub use engine::Map;
|
||||
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
pub use parser::FLOAT;
|
||||
|
||||
#[cfg(not(feature = "no_module"))]
|
||||
pub use module::ModuleResolver;
|
||||
|
||||
@@ -151,7 +164,7 @@ pub use token::{get_next_token, parse_string_literal, InputStream, Token, Tokeni
|
||||
|
||||
#[cfg(feature = "internals")]
|
||||
#[deprecated(note = "this type is volatile and may change")]
|
||||
pub use parser::{
|
||||
pub use ast::{
|
||||
BinaryExpr, CustomExpr, Expr, FloatWrapper, Ident, IdentX, ReturnType, ScriptFnDef, Stmt,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user