Split AST into separate files.
This commit is contained in:
@@ -561,7 +561,7 @@ impl Engine {
|
||||
_ => (),
|
||||
}
|
||||
|
||||
// Scripted function call?
|
||||
// Script-defined function call?
|
||||
#[cfg(not(feature = "no_function"))]
|
||||
if let Some(FnResolutionCacheEntry { func, source }) = self
|
||||
.resolve_fn(mods, state, lib, fn_name, hashes.script, None, false, false)
|
||||
@@ -570,7 +570,7 @@ impl Engine {
|
||||
// Script function call
|
||||
assert!(func.is_script());
|
||||
|
||||
let func = func.get_script_fn_def().expect("scripted function");
|
||||
let func = func.get_script_fn_def().expect("script-defined function");
|
||||
|
||||
if func.body.is_empty() {
|
||||
return Ok((Dynamic::UNIT, false));
|
||||
@@ -1271,7 +1271,7 @@ impl Engine {
|
||||
match func {
|
||||
#[cfg(not(feature = "no_function"))]
|
||||
Some(f) if f.is_script() => {
|
||||
let fn_def = f.get_script_fn_def().expect("scripted function");
|
||||
let fn_def = f.get_script_fn_def().expect("script-defined function");
|
||||
|
||||
if fn_def.body.is_empty() {
|
||||
Ok(Dynamic::UNIT)
|
||||
|
@@ -476,7 +476,7 @@ impl CallableFunction {
|
||||
Self::Script(_) => false,
|
||||
}
|
||||
}
|
||||
/// Is this a Rhai-scripted function?
|
||||
/// Is this a script-defined function?
|
||||
#[inline]
|
||||
#[must_use]
|
||||
pub const fn is_script(&self) -> bool {
|
||||
|
@@ -163,7 +163,7 @@ impl Engine {
|
||||
result
|
||||
}
|
||||
|
||||
// Does a scripted function exist?
|
||||
// Does a script-defined function exist?
|
||||
#[must_use]
|
||||
pub(crate) fn has_script_fn(
|
||||
&self,
|
||||
|
Reference in New Issue
Block a user