First implementation moving over to the new exit matcher class system.

This commit is contained in:
Tom Alexander
2023-04-18 20:33:01 -04:00
parent fcd5c7d3cd
commit 35eff51d1b
8 changed files with 46 additions and 42 deletions

View File

@@ -3,6 +3,7 @@ use super::Context;
use crate::parser::element::element;
use crate::parser::error::CustomError;
use crate::parser::error::MyError;
use crate::parser::exiting::ExitClass;
use crate::parser::greater_element::GreaterBlock;
use crate::parser::parser_context::ChainBehavior;
use crate::parser::parser_context::ContextElement;
@@ -45,7 +46,8 @@ pub fn greater_block<'r, 's>(
.with_additional_node(ContextElement::ConsumeTrailingWhitespace(true))
.with_additional_node(ContextElement::GreaterBlock(name))
.with_additional_node(ContextElement::ExitMatcherNode(ExitMatcherNode {
exit_matcher: ChainBehavior::IgnoreParent(Some(&greater_block_end)),
class: ExitClass::Alpha,
exit_matcher: &greater_block_end,
}));
let element_matcher = parser_with_context!(element)(&parser_context);