Merge pull request #62 from Eliah-Lakhin/ast-shared-module

Exposing AST functions shared module under internals feature
This commit is contained in:
Stephen Chung 2021-01-16 11:30:39 +08:00 committed by GitHub
commit 234f543db3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -266,12 +266,21 @@ impl AST {
&mut self.statements
}
/// Get the internal shared [`Module`] containing all script-defined functions.
#[cfg(not(feature = "internals"))]
#[cfg(not(feature = "no_module"))]
#[cfg(not(feature = "no_function"))]
#[inline(always)]
pub(crate) fn shared_lib(&self) -> Shared<Module> {
self.functions.clone()
}
/// Get the internal shared [`Module`] containing all script-defined functions.
#[cfg(feature = "internals")]
#[cfg(not(feature = "no_module"))]
#[cfg(not(feature = "no_function"))]
#[inline(always)]
pub fn shared_lib(&self) -> Shared<Module> {
self.functions.clone()
}
/// Get the internal [`Module`] containing all script-defined functions.
#[cfg(not(feature = "internals"))]
#[inline(always)]