Add new &Module parameter to native functions.

This commit is contained in:
Stephen Chung
2020-07-06 12:04:02 +08:00
parent 495d202af4
commit ea86888638
10 changed files with 107 additions and 99 deletions

View File

@@ -298,6 +298,12 @@ impl Add<Self> for &AST {
}
}
impl<'a> From<&'a AST> for &'a Module {
fn from(ast: &'a AST) -> Self {
ast.lib()
}
}
/// A type representing the access mode of a scripted function.
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
pub enum FnAccess {