Expand description
ASTs for type annotations and their parsing logic.
§Overview
This module contains types representing AST for parsed type annotations; for example,
TypeAst
and FunctionAst
. These two types expose parse
method which
allows to integrate them into nom
parsing.
Structs§
- Constraints
Ast - Parameter constraints, e.g.
for<len! N; T: Lin>
. - Function
Ast - Parsed functional type.
- Object
Ast - Object type or constraint, such as
{ x: Num, y: [(Num, Bool)] }
. - Slice
Ast - Parsed slice type, such as
[Num; N]
. - Tuple
Ast - Parsed tuple type, such as
(Num, Bool)
or(fn() -> Num, ...[Num; _])
. - Type
Constraints Ast - Bounds that can be placed on a type variable.
Enums§
- AstConversion
Error - Kinds of errors that can occur when converting
*Ast
types into their “main” counterparts. - Tuple
LenAst - Parsed tuple length.
- TypeAst
- Type annotation after parsing.
Type Aliases§
- Spanned
Type Ast - Spanned
TypeAst
.