Skip to main content

options

Macro options 

Source
macro_rules! options {
    ($($(#[$attr:meta])* $field:ident : $value:expr),* $(,)?) => { ... };
}
Expand description

Construct Options from its defaults and a list of field assignments.

ยงExamples

let options = granit_parser::options! {
    emit_comments: false,
    simple_key_max_lookahead: 2048,
};

assert!(!options.emit_comments);
assert_eq!(options.simple_key_max_lookahead, 2048);
assert_eq!(options.flow_nesting_limit, 255);
assert_eq!(options.block_nesting_limit, 255);