Make merged namespace more efficient.

This commit is contained in:
Stephen Chung
2020-10-02 23:14:33 +08:00
parent 08ca90a136
commit a72f70846f
6 changed files with 57 additions and 56 deletions

View File

@@ -301,8 +301,10 @@ impl AST {
/// Iterate through all functions
#[cfg(not(feature = "no_function"))]
pub fn iter_functions(&self) -> impl Iterator<Item = (FnAccess, &str, usize)> {
self.1.iter_script_fn_info()
pub fn iter_functions<'a>(
&'a self,
) -> impl Iterator<Item = (FnAccess, &str, usize, Shared<ScriptFnDef>)> + 'a {
self.1.iter_script_fn()
}
/// Clear all function definitions in the `AST`.