Skip to main content

parse_declarations

Function parse_declarations 

Source
pub fn parse_declarations<'src, D>(text: &'src str) -> ParsedDeclarations<D>
where D: Parse<'src> + 'src,
Expand description

Parse header declarations, one per statement, keeping spans and recovering after malformed declarations.

Accepts exactly the headers accepted by HeaderDeclarations<D>: one declaration per line, continued onto following lines only inside an open bracket, with ; comments. Line numbers in messages count from 1 at the start of text; use parse_declarations_at when text is part of a larger file.