Skip to main content

parse

Function parse 

Source
pub fn parse(scanned: Recovered<ScannedSource>) -> Recovered<SourceFile>
Expand description

Parses a scanned source into a recovered SourceFile.

The scanner’s diagnostics are consumed, unioned with the parse diagnostics, canonically ordered, and deduplicated; the identical vector is stored in the SourceFile and returned in the Recovered wrapper. The stored token stream is the parser-observed stream: identical to the scanner’s except where a grammar-driven rescan merged a regular-expression literal or split a >-family operator, so it still tiles the source and retains all trivia and the end-of-file token.