Struct mech_syntax::parser::TextFormatter
source · pub struct TextFormatter<'a> { /* private fields */ }Expand description
This struct is responsible for analysing text, interpreting indices and ranges, and producing formatted messages.
Implementations§
source§impl<'a> TextFormatter<'a>
impl<'a> TextFormatter<'a>
pub fn new(text: &'a str) -> Self
sourcepub fn format_error(&self, errors: &ParserErrorReport) -> String
pub fn format_error(&self, errors: &ParserErrorReport) -> String
Get formatted error message.