Expand description
The syntax layer of Constructo: the lexer, the parser, the tree of a value, the printer of values, the limits on
what is read, and the diagnostics, with what the codecs that constructo codegen generates call in codec.
It is the part of constructo that code generated by constructo codegen depends on, so that the generated code
and constructo check read the same syntax. constructo re-exports these modules under the same names.
Modulesยง
- ast
- The syntax trees for data-type declarations and data values.
- codec
- What the codec that
constructo codegengenerates calls and needs no trait for: the error of reading or writing a value, the setting of how names are written, the parts of a record and a tuple in the order of their declaration, the numbers, and the builders of a tree. - diagnostics
- Source positions and diagnostics.
- lexer
- Converts the text of a types file into tokens.
- limits
- The limits on what the runtime reads. The text that it parses may come from anywhere, so it is not trusted, and the recursive parser would otherwise grow its stack with the nesting of the input until the process crashed.
- parser
- A recursive-descent parser for types files and values files.
- values_
text - The text of data-values: the writer that
convert --fromuses to give back values that it has read.