Module ast
SourceDescription
AST types used by the macro system.
Declares the raw-token vocabulary, the structured pattern/expression/type-expression trees, and the record/union shapes consumed by derive-style macros.
Data Types
Records
- FieldDef
Describes a single field of a record type definition: its declared name
- ImplDef
A generated
:implblock: the trait name, the type arguments applied to- ImplOpDef
One operation (method) inside a generated
:implblock: method name,- MatchArm
One arm of a
:matchexpression: apatternplus thebodyexpressions- RecordTypeDef
Describes a record type definition consumed by derive-style macros:
- UnionTypeDef
Describes a union type definition consumed by derive-style macros:
- VariantDef
Describes a single variant of a union type definition: its name and the
Unions
- Expr
Structured expression tree produced by
parse-expr.- Pattern
Structured match pattern produced by
parse-pattern.- Token
Raw token produced by the lexer.
- TopLevelAst
Top-level AST node produced by a derive-style macro.
- TypeDef
A type definition suitable for a derive macro input — either a record
- TypeExprAst
Parsed type expression.