Skip to main content

Crate draxl_ast

Crate draxl_ast 

Source
Expand description

Typed IR for Draxl.

This crate defines the shared syntax model for the entire workspace:

  • stable metadata on modeled nodes
  • typed items, statements, expressions, patterns, and types
  • deterministic JSON emission for test fixtures and tooling

It deliberately does not own parsing, validation rules, formatting policy, lowering, or patch application.

Structs§

Block
Block expression body.
CommentNode
Line comment node.
DocNode
Doc comment node.
ExprBinary
Binary expression.
ExprCall
Call expression.
ExprGroup
Grouped expression that preserves source parentheses.
ExprLit
Literal expression.
ExprMatch
Match expression.
ExprPath
Path expression.
ExprUnary
Unary expression.
Field
Struct field.
File
Parsed Draxl file.
ItemEnum
Enum item.
ItemFn
Function item.
ItemMod
Module item.
ItemStruct
Struct item.
ItemUse
Use item.
MatchArm
Match arm.
Meta
Shared metadata carried by Draxl nodes.
Param
Function parameter.
PatIdent
Identifier pattern.
PatWild
Wildcard pattern.
Path
Path value.
Span
Byte range in the original source file.
StmtExpr
Expression statement.
StmtLet
Let statement.
TypePath
Path type.
UseGlob
Glob use tree leaf.
UseGroup
Braced use tree group.
UseName
Single-name use tree segment.
UsePathTree
Prefix-plus-child use tree segment.
Variant
Enum variant.

Enums§

BinaryOp
Binary operator in the bootstrap subset.
Expr
Expression in the bootstrap subset.
Item
Top-level or module item.
Literal
Literal value.
Pattern
Pattern in the bootstrap subset.
Stmt
Statement inside a block.
Type
Type in the bootstrap subset.
UnaryOp
Unary operator in the bootstrap subset.
UseTree
Tree form for use items in the bootstrap subset.

Type Aliases§

NodeId
Stable identifier attached to an Draxl node.
Rank
Opaque ordering key for ordered list slots.
SlotName
Explicit name for the slot that owns a node.