Refactor.

This commit is contained in:
Stephen Chung
2020-08-24 22:37:44 +08:00
parent 2fbc1b7910
commit 9ab3d87cfc
6 changed files with 85 additions and 74 deletions

View File

@@ -37,16 +37,16 @@ macro_rules! gen_functions {
}
macro_rules! reg_print_functions {
($mod_name:ident += $root:ident ; $($arg_type:ident),+) => {
$(set_exported_fn!($mod_name, FN_TO_STRING, $root::$arg_type::to_string_func);)*
$(set_exported_fn!($mod_name, KEYWORD_PRINT, $root::$arg_type::to_string_func);)*
}
($mod_name:ident += $root:ident ; $($arg_type:ident),+) => { $(
set_exported_fn!($mod_name, FN_TO_STRING, $root::$arg_type::to_string_func);
set_exported_fn!($mod_name, KEYWORD_PRINT, $root::$arg_type::to_string_func);
)* }
}
macro_rules! reg_debug_functions {
($mod_name:ident += $root:ident ; $($arg_type:ident),+) => {
$(set_exported_fn!($mod_name, KEYWORD_DEBUG, $root::$arg_type::to_string_func);)*
}
($mod_name:ident += $root:ident ; $($arg_type:ident),+) => { $(
set_exported_fn!($mod_name, KEYWORD_DEBUG, $root::$arg_type::to_string_func);
)* }
}
def_package!(crate:BasicStringPackage:"Basic string utilities, including printing.", lib, {