Skip to main content

parse_first_statement

Function parse_first_statement 

Source
pub fn parse_first_statement(
    source: &str,
    base: usize,
) -> (Option<BodyStmt>, Vec<Diagnostic>)
Expand description

Parses exactly ONE statement from the front of source (used by then expansion to consume the chained effect statement without parsing — and spuriously diagnosing — the remainder of the enclosing block). Returns the statement and only the diagnostics that single parse produced.