pub type TransitionMethod = fn(src_lines: &Vec<String>, base_indent: usize, section_level: &mut usize, line_cursor: &mut LineCursor, doctree: DocTree, captures: &Captures<'_>, pattern_name: &Pattern) -> TransitionResult;Expand description
A function pointer type alias for a State transition method.
TransitionMethods take in the document tree and regex captures
for doctree modifications.
They return a TransitionResult::{Success, Failure}, the success variant of which contains a doctree,
a possible next state for the parser, information about manipulating the machine stack and whether to advance the parser line cursor.
If the optional next state is not None, the current state is either replaced with the new state or
the new state is pushed on top of the machine stack of the parser and parsing proceeds
in that state from the current line.