silence_tree

Macro silence_tree 

Source
macro_rules! silence_tree {
    ($parser:expr $(,)?) => { ... };
    ($tag:ident, $parser:expr $(,)?) => { ... };
    ($context:expr, $parser:expr $(,)?) => { ... };
    ($tag:ident, $context:expr, $parser:expr $(,)?) => { ... };
    ($caller:expr, $tag:ident, $parser:expr $(,)?) => { ... };
    ($caller:expr, $context:expr, $parser:expr $(,)?) => { ... };
    ($caller:expr, $tag:ident, $context:expr, $parser:expr $(,)?) => { ... };
}
Expand description

Silences the tracing for a subtree of parsers.

This macro wraps a parser and prevents it and its sub-parsers from generating trace output. It’s useful for reducing noise in the trace output for well-tested or less interesting parts of your parser.

§Usage

  • silence_tree!(parser): Silences the default tag.
  • silence_tree!(tag, parser): Silences a specific tag.
  • silence_tree!("context", parser): Silences the default tag with a context.
  • silence_tree!(tag, "context", parser): Silences a specific tag with a context.