New syntax for def_package.

This commit is contained in:
Stephen Chung
2021-12-20 11:42:39 +08:00
parent 5729f0cdd4
commit bca9fe53b0
16 changed files with 452 additions and 370 deletions

View File

@@ -15,12 +15,15 @@ use crate::Map;
pub const FUNC_TO_STRING: &str = "to_string";
pub const FUNC_TO_DEBUG: &str = "to_debug";
def_package!(crate:BasicStringPackage:"Basic string utilities, including printing.", lib, {
lib.standard = true;
def_package! {
/// Package of basic string utilities (e.g. printing)
crate::BasicStringPackage => |lib| {
lib.standard = true;
combine_with_exported_module!(lib, "print_debug", print_debug_functions);
combine_with_exported_module!(lib, "number_formatting", number_formatting);
});
combine_with_exported_module!(lib, "print_debug", print_debug_functions);
combine_with_exported_module!(lib, "number_formatting", number_formatting);
}
}
// Register print and debug