parse_section

Macro parse_section 

Source
macro_rules! parse_section {
    ($section:expr, $parser:expr) => { ... };
}
Expand description

Section parser

Takes a section delimited by .section and .end_section and applies the given parser to the content of the section.

ยงExample

use idf_parser::primitives::ws;
use idf_parser::parse_section;
use nom::Parser;
use nom::sequence::delimited;
use nom::bytes::complete::tag;

let input = ".SECTION
howdy!
.END_SECTION";

let (remaining, point) = parse_section!("SECTION", tag("howdy!")).parse(input).unwrap();