Skip to main content

Module parser

Module parser 

Source
Expand description

Recursive-descent parser for Lex. Pratt-style precedence climbing for binary operators; everything else is straightforward LL(1)-with-lookahead.

Structs§

ParseError

Functions§

parse
parse_with_src
Parse + attach # line-comments to the AST. The source string is used only to scan the gaps between tokens (where the lexer skipped whitespace and comments); the parser itself still operates purely on tokens. See Program::leading_comments for the data model.