macro_rules! parser_config {
() => { ... };
( $( $field:ident : $value:expr ),+ $(,)? ) => { ... };
}Expand description
Construct a crate::ParserConfig from a field-value list.
Equivalent to chaining the named builder methods on
crate::ParserConfig::new(). Empty input returns the
new() baseline. Trailing comma is permitted.
§Examples
use noyalib::parser_config;
// Empty form — equivalent to `ParserConfig::new()`.
let _ = parser_config! {};
// Full chain.
let cfg = parser_config! {
max_depth: 32,
max_alias_expansions: 200,
strict_booleans: true,
};
assert_eq!(cfg.max_depth, 32);
assert_eq!(cfg.max_alias_expansions, 200);
assert!(cfg.strict_booleans);