macro_rules! create_module {
(
$(
class($mname:expr) $name:ty => $md:ident {
$(
static($lbls:ident $($sgns:expr),+) $sf:ident
),*
$(
instance($lbli:ident $($sgni:expr),+) $inf:ident
),*
}
)+
module => $modl:ident
) => { ... };
(@sgn fn $nom:expr, $arity:expr) => { ... };
(@sgn getter $name:expr) => { ... };
(@sgn setter $name:expr) => { ... };
(@fn static $name:ty => $s:ident) => { ... };
(@fn instance $name:ty => $inf:ident) => { ... };
}
Creates a function at $modl::publish_module, that takes a &mut ModuleLibrary
and handles Module object creation and registration
Also internally creates all the necessary extern "C" functions for Wren's callbacks