pub fn validate_pairs(
pairs: Pairs<'_, Rule>,
) -> Result<Vec<&str>, Vec<Error<Rule>>>
Expand description
It checks the parsed grammar for common mistakes:
- using Pest keywords
- duplicate rules
- undefined rules
It returns a Result
with a Vec
of Error
s if any of the above is found.
If no errors are found, it returns the vector of names of used builtin rules.