Skip to main content

Module parser

Module parser 

Source

Structs§

ParsedFile
A parsed file: its top-level statements and its generic impl blocks.

Enums§

ExitLine
How a line at the prompt writes the way out of the session.
LineKind
What one line of source is, as far as the grammar can tell from its opening tokens.
TypeArgFollow
What a type-argument list may be followed by at the position it is read.

Constants§

MAX_NESTING_DEPTH
The deepest that terms, blocks and types may nest.

Functions§

catch_kinds_and_strings
The kinds src names in catch "kind" clauses, and its other strings.
classify_line
Reads line as far as its first tokens, and says which of LineKind it opens.
exit_line
Whether the only statement line holds is a call to exit, and in which of its two forms.
module_name
The name an import binds its module under when it says no other: the last segment of the path, without the .cdl the file name ends in.
parse