Module ra_ap_syntax::ast
source · Expand description
Abstract Syntax Tree, layered on top of untyped SyntaxNodes
Modules
- This module contains functions for editing syntax trees. As the trees are immutable, all function here return a fresh copy of the tree, instead of doing an in-place modification.
- Structural editing for ast.
- This module contains free-standing functions for creating AST fragments out of smaller pieces.
- Precedence representation.
Structs
- An iterator over
SyntaxNodechildren of a particular AST type.
Enums
Traits
- The main trait to go from untyped
SyntaxNodeto a typed ast. The conversion itself has zero runtime cost: ast and syntax nodes have exactly the same representation: a pointer to the tree root and a pointer to the node itself. - Like
AstNode, but wraps tokens rather than interior nodes.