Remove ChainBehavior.
This commit is contained in:
		
							parent
							
								
									35eff51d1b
								
							
						
					
					
						commit
						a2051aca4f
					
				| @ -16,7 +16,6 @@ use nom::sequence::tuple; | ||||
| use crate::parser::element::element; | ||||
| use crate::parser::exiting::ExitClass; | ||||
| use crate::parser::object::standard_set_object; | ||||
| use crate::parser::parser_context::ChainBehavior; | ||||
| use crate::parser::parser_context::ContextElement; | ||||
| use crate::parser::parser_context::ContextTree; | ||||
| use crate::parser::parser_context::ExitMatcherNode; | ||||
|  | ||||
| @ -12,7 +12,6 @@ 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; | ||||
| use crate::parser::parser_with_context::parser_with_context; | ||||
|  | ||||
| @ -9,3 +9,9 @@ pub enum ExitClass { | ||||
|     /// Elements who cede priority to alpha elements when matching.
 | ||||
|     Beta = 300, | ||||
| } | ||||
| 
 | ||||
| impl std::fmt::Display for ExitClass { | ||||
|     fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||||
|         write!(f, "{:?}", self) | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -4,7 +4,6 @@ use super::Context; | ||||
| use crate::parser::element::element; | ||||
| use crate::parser::exiting::ExitClass; | ||||
| use crate::parser::greater_element::FootnoteDefinition; | ||||
| use crate::parser::parser_context::ChainBehavior; | ||||
| use crate::parser::parser_context::ContextElement; | ||||
| use crate::parser::parser_context::ExitMatcherNode; | ||||
| use crate::parser::parser_with_context::parser_with_context; | ||||
|  | ||||
| @ -5,7 +5,6 @@ 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; | ||||
| use crate::parser::parser_context::ExitMatcherNode; | ||||
| use crate::parser::parser_with_context::parser_with_context; | ||||
|  | ||||
| @ -8,7 +8,6 @@ use nom::sequence::tuple; | ||||
| 
 | ||||
| use crate::parser::exiting::ExitClass; | ||||
| use crate::parser::object::standard_set_object; | ||||
| use crate::parser::parser_context::ChainBehavior; | ||||
| use crate::parser::parser_context::ContextElement; | ||||
| use crate::parser::parser_context::ExitMatcherNode; | ||||
| use crate::parser::parser_with_context::parser_with_context; | ||||
|  | ||||
| @ -158,23 +158,10 @@ pub struct ExitMatcherNode<'r> { | ||||
|     pub class: ExitClass, | ||||
| } | ||||
| 
 | ||||
| #[derive(Clone)] | ||||
| pub enum ChainBehavior<'r> { | ||||
|     AndParent(Option<&'r Matcher>), | ||||
|     IgnoreParent(Option<&'r Matcher>), | ||||
| } | ||||
| 
 | ||||
| impl<'r> std::fmt::Debug for ExitMatcherNode<'r> { | ||||
|     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||||
|         let mut formatter = f.debug_struct("ExitMatcherNode"); | ||||
|         // match self {
 | ||||
|         //     ChainBehavior::AndParent(_) => {
 | ||||
|         //         formatter = formatter.field("type", &"AndParent");
 | ||||
|         //     }
 | ||||
|         //     ChainBehavior::IgnoreParent(_) => {
 | ||||
|         //         formatter = formatter.field("type", &"IgnoreParent");
 | ||||
|         //     }
 | ||||
|         // };
 | ||||
|         formatter.field("class", &self.class.to_string()); | ||||
|         formatter.finish() | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -9,7 +9,6 @@ use super::util::non_whitespace_character; | ||||
| use super::Context; | ||||
| use crate::parser::element::element; | ||||
| use crate::parser::exiting::ExitClass; | ||||
| use crate::parser::parser_context::ChainBehavior; | ||||
| use crate::parser::parser_context::ContextElement; | ||||
| use crate::parser::parser_context::ExitMatcherNode; | ||||
| use crate::parser::util::blank_line; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tom Alexander
						Tom Alexander