Add return type to function metadata.

This commit is contained in:
Stephen Chung
2020-11-22 22:15:17 +08:00
parent 6222f14fcb
commit 8d410dfc71
11 changed files with 373 additions and 50 deletions

View File

@@ -89,7 +89,7 @@ impl fmt::Display for ScriptFnDef {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
"{}{}({})",
"{}{}({}) -> Dynamic",
if self.access.is_private() {
"private "
} else {
@@ -151,6 +151,7 @@ impl AST {
&mut self.0
}
/// Get the internal shared [`Module`] containing all script-defined functions.
#[cfg(not(feature = "no_function"))]
#[inline(always)]
pub(crate) fn shared_lib(&self) -> Shared<Module> {
self.1.clone()