Skip to main content

Module parser

Module parser 

Source
Expand description

Recursive-descent parser. On an error it records a diagnostic, skips to the end of the line and carries on, so one mistake reports once instead of cascading.

Modulesยง

expr ๐Ÿ”’
Expressions, parsed by precedence climbing.
item ๐Ÿ”’
Top-level declarations and type expressions.
stmt ๐Ÿ”’
Statements and blocks.

Structsยง

Parser ๐Ÿ”’
Reported ๐Ÿ”’
The diagnostic is already recorded; the caller should recover.

Functionsยง

parse ๐Ÿ”’
Lexes and parses source, returning the tree and every diagnostic in source order.

Type Aliasesยง

ParseResult ๐Ÿ”’