From 421baebbc130e3b4a4b95c25f8108a177012bf8b Mon Sep 17 00:00:00 2001 From: Ilya Lakhin Date: Sat, 16 Jan 2021 01:38:50 +0700 Subject: [PATCH] Exposing AST functions shared module under internals feature --- src/ast.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ast.rs b/src/ast.rs index 12bf72ec..c68555e9 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -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 { 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 { + self.functions.clone() + } /// Get the internal [`Module`] containing all script-defined functions. #[cfg(not(feature = "internals"))] #[inline(always)]