Skip to main content

Module parser

Module parser 

Source
Expand description

The recursive-descent driver. Spec §3.

The parser never returns Err for a syntax error. It records a diagnostic, wraps the offending range in an error node, and resynchronises — because a frontend that stops at the first mistake makes a large file take as many runs as it has mistakes.

Structs§

Parse
What came out of parsing a file.
Parser
The parser state.

Functions§

parse
Parse a file.
parse_preprocessed
Parse a preprocessed stream.
parse_preprocessed_with
Parse a preprocessed stream under a chosen dialect.
parse_with
Parse under a chosen dialect.