pub fn parse(input: &str) -> Result<Pairs<'_, Rule>, ParserError>Expand description
Parses an input string into Pairs<Rule>.
It checks for empty error and then uses Grammar to parse the input with the file rule.
§Arguments
input- The string to parse.
§Returns
A Result containing successful Pairs<'_, Rule> or a ParserError.
§Errors
Returns ParserError::PestError if Pest fails to parse the input string.
Returns ParserError::EmptyInputError if input is empty.