Skip to main content

check_grammar_round_trip

Function check_grammar_round_trip 

Source
pub fn check_grammar_round_trip(
    source: &str,
    round_trip: &GrammarRoundTrip<'_>,
) -> Result<GrammarRoundTripReport, GrammarRoundTripError>
Expand description

Round trips source through a mutated export and reports every failure.

The grammar is imported, mutated, exported and re-imported, and every way the pair failed to carry the grammar and the mutation is reported. Malformed sources are rejected by the importer, whose error is returned.