pub fn pretty_helpful_error_string(&self, input: &str) -> String {
        let mut output = String::with_capacity(256);

        let info = match self {
            TwigParseError::ParsingError(i) => i,
            TwigParseError::ParsingFailure(i) => i,
        };

        let (line, column, last_line) = get_line_and_column_of_subslice(input, info.leftover);

        output = format!(
            "{}Parsing goes wrong in line {} and column {} :\n",
            output, line, column
        );

        output = format!("{}{}\n", output, last_line);

        for _ in 0..(column - 1) {
            output = format!("{} ", output);
        }

        output = format!("{}^\n", output);

        for _ in 0..(column - 1) {
            output = format!("{} ", output);
        }

        output = format!("{}|\n", output);

        //output = format!("{}{:?}", output, info.kind);

        output = match &info.context {
            None => format!("{}{:?}", output, info.kind),
            Some(c) => format!("{}{}", output, c),
        };

        output
    }
/// Use the parsing error and the raw input to generate a human friendly error message.
/// This message contains line and column information, the line itself and other information from the error.

Use the parsing error and the raw input to generate a human friendly error message.
This message contains line and column information, the line itself and other information from the error.
Use the parsing error and the raw input to generate a human friendly error message . This message contains line and column information the line itself and other information from the error .
pub fn pretty_helpful_error_string(&self, input: &str) -> String {
        let mut output = String::with_capacity(256);
        let info = match self {
            TwigParseError::ParsingError(i) => i,
            TwigParseError::ParsingFailure(i) => i,
        };
        let (line, column, last_line) = get_line_and_column_of_subslice(input, info.leftover);
        output = format!(
            "{}Parsing goes wrong in line {} and column {} :\n",
            output, line, column
        );
        output = format!("{}{}\n", output, last_line);
        for _ in 0..(column - 1) {
            output = format!("{} ", output);
        }
        output = format!("{}^\n", output);
        for _ in 0..(column - 1) {
            output = format!("{} ", output);
        }
        output = format!("{}|\n", output);
        //output = format!("{}{:?}", output, info.kind);
        output = match &info.context {
            None => format!("{}{:?}", output, info.kind),
            Some(c) => format!("{}{}", output, c),
        };
        output
    }
pub fn pretty_helpful_error_string ( & self , input : & str ) -> String { let mut output = String :: with_capacity ( 256 ) ; let info = match self { TwigParseError :: ParsingError ( i ) => i , TwigParseError :: ParsingFailure ( i ) => i , } ; let ( line , column , last_line ) = get_line_and_column_of_subslice ( input , info . leftover ) ; output = format ! ( " \n " output line column ) ; output = format ! ( " \n " output last_line ) ; for _ in 0 .. ( column - 1 ) { output = format ! ( " " output ) ; } output = format ! ( " \n " output ) ; for _ in 0 .. ( column - 1 ) { output = format ! ( " " output ) ; } output = format ! ( " \n " output ) ; //output = format!("{}{:?}", output, info.kind);
 output = match & info . context { None => format ! ( " " output info kind ) , Some ( c ) => format ! ( " " output c ) , } ; output }
Use the parsing error and the raw input to generate a human friendly error message.
Use the parsing error and the raw input to generate a human friendly error message .
&self
input
&str
&self
input
&str