Skip to main content

Module parser

Module parser 

Source
Expand description

Recursive-descent parser, with Pratt parsing for binary operators.

Structs§

Failed
Signals that a diagnostic was recorded and the caller should recover.

Constants§

MAX_NESTING
How deeply expressions, blocks and patterns may nest. Deeper programs would risk overflowing the stack of the recursive parser and of the passes after it.

Functions§

parse_expr
Parse a single expression (used for string interpolation and the REPL).
parse_program
Parse a whole program. Parsing continues after errors, so the program is returned even when there are diagnostics.