First implementation moving over to the new exit matcher class system.
This commit is contained in:
@@ -11,6 +11,7 @@ use nom::sequence::tuple;
|
||||
use super::Context;
|
||||
use crate::parser::element::element;
|
||||
use crate::parser::error::Res;
|
||||
use crate::parser::exiting::ExitClass;
|
||||
use crate::parser::parser_context::ChainBehavior;
|
||||
use crate::parser::parser_context::ContextElement;
|
||||
use crate::parser::parser_context::ExitMatcherNode;
|
||||
@@ -36,7 +37,8 @@ pub fn drawer<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str,
|
||||
let parser_context = context
|
||||
.with_additional_node(ContextElement::ConsumeTrailingWhitespace(true))
|
||||
.with_additional_node(ContextElement::ExitMatcherNode(ExitMatcherNode {
|
||||
exit_matcher: ChainBehavior::AndParent(Some(&drawer_end)),
|
||||
class: ExitClass::Alpha,
|
||||
exit_matcher: &drawer_end,
|
||||
}));
|
||||
|
||||
let element_matcher = parser_with_context!(element)(&parser_context);
|
||||
|
||||
Reference in New Issue
Block a user