Skip to main content

Module parser

Module parser 

Source
Expand description

A recursive-descent parser for types files and values files.

It is the parser of constructo check. Generated code reads values through codec::parse, which uses it, and does not parse types files.

The parser stops at the first syntax error: there is no error recovery.

Structs§

Experimental
The experimental features of the syntax, each of which has to be switched on to be accepted.
SyntaxError
The first syntax error found in a text.

Enums§

Parsed
The contents of a successfully parsed file.
SourceKind
The kind of a file, which is decided by its first token.

Functions§

parse
Parses the text of a types file into its declarations, with no experimental features.
parse_file
Classifies a file by its first token and parses it with the matching grammar.
parse_values
Parses the text of a values file into its values, with no experimental features.
parse_values_with
Parses the text of a values file into its values, accepting the experimental features that are switched on.