Skip to main content

merge_syntax_errors

Function merge_syntax_errors 

Source
pub fn merge_syntax_errors(
    strict: Vec<CompileError>,
    recovered: Vec<CompileError>,
) -> Vec<CompileError>
Expand description

#1663: a strict parse’s error(s) together with a recovering parse’s, each reported once. The strict errors come first and always survive: some rules hold only for the strict single-unit parse (extra_tokens, a commons expected but a context found), which the multi-unit recovering parse accepts. A recovered error at the same position as one already listed is the same fault (the two parsers may name it differently) and is dropped.