Macro ARGONE
Source macro_rules! ARGONE {
(@PassOrB $a:expr, $b:expr) => { ... };
(@PassOrB , $b:expr) => { ... };
(@Parse) => { ... };
(@Parse $file:literal, $($prefix:literal)?, $( ($($config_panic:expr),*) )?) => { ... };
(@SetConfig $config:expr, $file:literal, ,) => { ... };
(@SetConfig $config:expr, $file:literal, , ($($config_panic:expr),*)) => { ... };
(@SetConfig $config:expr, $file:literal, $prefix:literal,) => { ... };
(@SetConfig $config:expr, $file:literal, $prefix:literal, ($($config_panic:expr),*)) => { ... };
(@SetConfig @If $conf:expr, $opts:expr, $name:ident,) => { ... };
(@SetConfig @If $conf:expr, $opts:expr, [Config] $name:ident, $($default:expr)?) => { ... };
(
@Args {
{
$(#[$meta:meta])*
}
$(
$(#[$f_meta:meta])*
$([$tt:tt])? $name:ident: $ty:ty$( = $default:expr)?,
)*
}
) => { ... };
(
$(#[$main_meta:meta])*
$(version = $version:literal $(;)?$(,)?)?
$(author = $author:literal $(;)?$(,)?)?
$(about = $about:literal $(;)?$(,)?)?
$(Config {
file = $config_file:literal $(;)?$(,)?
$(prefix = $config_prefix:literal $(;)?$(,)?)?
$(panic = ($($config_panic:expr),*) $(;)?$(,)?)?
})?
Args {
$(
$(#[$args_meta:meta])*
$(($($clap_arg:stmt),*))?
$([$tt:tt])? $args_name:ident: $args_ty:ty $(= $args_default:expr)? $(;)?$(,)?
)+
}
$(
$(#[$subcommands_meta:meta])*
commands = $subcommands:ty $(;)?$(,)?
)?
) => { ... };
}