Fix builds.
This commit is contained in:
parent
9fa4d60336
commit
a3e79c0bd0
@ -322,7 +322,7 @@ impl Engine {
|
|||||||
/// The JSON string must be an object hash. It cannot be a simple scalar value.
|
/// The JSON string must be an object hash. It cannot be a simple scalar value.
|
||||||
///
|
///
|
||||||
/// Set `has_null` to `true` in order to map `null` values to `()`.
|
/// Set `has_null` to `true` in order to map `null` values to `()`.
|
||||||
/// Setting it to `false` will cause an [`ErrorVariableNotFound`][EvalAltResult::ErrorVariableNotFound] error during parsing.
|
/// Setting it to `false` will cause an [`ErrorVariableNotFound`][crate::EvalAltResult::ErrorVariableNotFound] error during parsing.
|
||||||
///
|
///
|
||||||
/// # JSON With Sub-Objects
|
/// # JSON With Sub-Objects
|
||||||
///
|
///
|
||||||
|
@ -256,23 +256,3 @@ impl<T> From<EvalAltResult> for Result<T, Box<EvalAltResult>> {
|
|||||||
Err(err.into())
|
Err(err.into())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl AST {
|
|
||||||
/// _(internals)_ Get the internal [`Module`] containing all script-defined functions.
|
|
||||||
/// Exported under the `internals` feature only.
|
|
||||||
///
|
|
||||||
/// Not available under `no_function`.
|
|
||||||
///
|
|
||||||
/// # Deprecated
|
|
||||||
///
|
|
||||||
/// This method is deprecated. Use [`shared_lib`][AST::shared_lib] instead.
|
|
||||||
///
|
|
||||||
/// This method will be removed in the next major version.
|
|
||||||
#[deprecated(since = "1.3.0", note = "use `shared_lib` instead")]
|
|
||||||
#[cfg(feature = "internals")]
|
|
||||||
#[inline(always)]
|
|
||||||
#[must_use]
|
|
||||||
pub fn lib(&self) -> &Module {
|
|
||||||
&self.functions
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -29,21 +29,21 @@ pub struct Limits {
|
|||||||
pub max_function_expr_depth: Option<NonZeroUsize>,
|
pub max_function_expr_depth: Option<NonZeroUsize>,
|
||||||
/// Maximum number of operations allowed to run.
|
/// Maximum number of operations allowed to run.
|
||||||
pub max_operations: Option<std::num::NonZeroU64>,
|
pub max_operations: Option<std::num::NonZeroU64>,
|
||||||
/// Maximum number of [modules][Module] allowed to load.
|
/// Maximum number of [modules][crate::Module] allowed to load.
|
||||||
///
|
///
|
||||||
/// Set to zero to effectively disable loading any [module][Module].
|
/// Set to zero to effectively disable loading any [module][crate::Module].
|
||||||
///
|
///
|
||||||
/// Not available under `no_module`.
|
/// Not available under `no_module`.
|
||||||
#[cfg(not(feature = "no_module"))]
|
#[cfg(not(feature = "no_module"))]
|
||||||
pub max_modules: usize,
|
pub max_modules: usize,
|
||||||
/// Maximum length of a [string][ImmutableString].
|
/// Maximum length of a [string][crate::ImmutableString].
|
||||||
pub max_string_size: Option<NonZeroUsize>,
|
pub max_string_size: Option<NonZeroUsize>,
|
||||||
/// Maximum length of an [array][Array].
|
/// Maximum length of an [array][crate::Array].
|
||||||
///
|
///
|
||||||
/// Not available under `no_index`.
|
/// Not available under `no_index`.
|
||||||
#[cfg(not(feature = "no_index"))]
|
#[cfg(not(feature = "no_index"))]
|
||||||
pub max_array_size: Option<NonZeroUsize>,
|
pub max_array_size: Option<NonZeroUsize>,
|
||||||
/// Maximum number of properties in an [object map][Map].
|
/// Maximum number of properties in an [object map][crate::Map].
|
||||||
///
|
///
|
||||||
/// Not available under `no_object`.
|
/// Not available under `no_object`.
|
||||||
#[cfg(not(feature = "no_object"))]
|
#[cfg(not(feature = "no_object"))]
|
||||||
|
20
src/ast.rs
20
src/ast.rs
@ -2442,3 +2442,23 @@ impl Expr {
|
|||||||
true
|
true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl AST {
|
||||||
|
/// _(internals)_ Get the internal [`Module`] containing all script-defined functions.
|
||||||
|
/// Exported under the `internals` feature only.
|
||||||
|
///
|
||||||
|
/// Not available under `no_function`.
|
||||||
|
///
|
||||||
|
/// # Deprecated
|
||||||
|
///
|
||||||
|
/// This method is deprecated. Use [`shared_lib`][AST::shared_lib] instead.
|
||||||
|
///
|
||||||
|
/// This method will be removed in the next major version.
|
||||||
|
#[deprecated(since = "1.3.0", note = "use `shared_lib` instead")]
|
||||||
|
#[cfg(feature = "internals")]
|
||||||
|
#[inline(always)]
|
||||||
|
#[must_use]
|
||||||
|
pub fn lib(&self) -> &crate::Module {
|
||||||
|
&self.functions
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -216,7 +216,7 @@ pub use engine::{EvalState, FnResolutionCache, FnResolutionCacheEntry, Imports};
|
|||||||
|
|
||||||
#[cfg(feature = "internals")]
|
#[cfg(feature = "internals")]
|
||||||
#[cfg(not(feature = "unchecked"))]
|
#[cfg(not(feature = "unchecked"))]
|
||||||
pub use engine::Limits;
|
pub use api::limits::Limits;
|
||||||
|
|
||||||
#[cfg(feature = "internals")]
|
#[cfg(feature = "internals")]
|
||||||
pub use module::NamespaceRef;
|
pub use module::NamespaceRef;
|
||||||
|
@ -2241,7 +2241,7 @@ impl Engine {
|
|||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn lex<'a>(
|
pub fn lex<'a>(
|
||||||
&'a self,
|
&'a self,
|
||||||
input: impl IntoIterator<Item = &'a (AsRef<str> + 'a)>,
|
input: impl IntoIterator<Item = &'a (impl AsRef<str> + 'a)>,
|
||||||
) -> (TokenIterator<'a>, TokenizerControl) {
|
) -> (TokenIterator<'a>, TokenizerControl) {
|
||||||
self.lex_raw(input, None)
|
self.lex_raw(input, None)
|
||||||
}
|
}
|
||||||
@ -2252,7 +2252,7 @@ impl Engine {
|
|||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn lex_with_map<'a>(
|
pub fn lex_with_map<'a>(
|
||||||
&'a self,
|
&'a self,
|
||||||
input: impl IntoIterator<Item = &'a (AsRef<str> + 'a)>,
|
input: impl IntoIterator<Item = &'a (impl AsRef<str> + 'a)>,
|
||||||
token_mapper: &'a OnParseTokenCallback,
|
token_mapper: &'a OnParseTokenCallback,
|
||||||
) -> (TokenIterator<'a>, TokenizerControl) {
|
) -> (TokenIterator<'a>, TokenizerControl) {
|
||||||
self.lex_raw(input, Some(token_mapper))
|
self.lex_raw(input, Some(token_mapper))
|
||||||
|
Loading…
Reference in New Issue
Block a user