Module ra_ap_syntax::ast[][src]

Abstract Syntax Tree, layered on top of untyped SyntaxNodes

Modules

edit

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.

edit_in_place

Structural editing for ast.

make

This module contains free-standing functions for creating AST fragments out of smaller pieces.

Structs

Abi
ArgList
ArrayExpr
ArrayType
AssocItemList
AssocTypeArg
AstChildren

An iterator over SyntaxNode children of a particular AST type.

Attr
AttrsOwnerNode

Basically an owned dyn AttrsOwner without extra boxing.

AwaitExpr
BinExpr
BlockExpr
BoxExpr
BoxPat
BreakExpr
ByteString
CallExpr
CastExpr
ClosureExpr
Comment
CommentIter
CommentKind
Condition
Const
ConstArg
ConstBlockPat
ConstParam
ContinueExpr
DynTraitType
EffectExpr
Enum
ExprStmt
ExternBlock
ExternCrate
ExternItemList
FieldExpr
FloatNumber
Fn
FnPtrType
ForExpr
ForType
GenericArgList
GenericParamList
IdentPat
IfExpr
Impl
ImplTraitType
IndexExpr
InferType
IntNumber
ItemList
Label
LetStmt
Lifetime
LifetimeArg
LifetimeParam
Literal
LiteralPat
LoopExpr
MacroCall
MacroDef
MacroItems
MacroPat
MacroRules
MacroStmts
MacroType
MatchArm
MatchArmList
MatchExpr
MatchGuard
MethodCallExpr
Module
Name
NameRef
NeverType
OrPat
Param
ParamList
ParenExpr
ParenPat
ParenType
Path
PathExpr
PathPat
PathSegment
PathType
PrefixExpr
PtrType
QuoteOffsets
RangeExpr
RangePat
RecordExpr
RecordExprField
RecordExprFieldList
RecordField
RecordFieldList
RecordPat
RecordPatField
RecordPatFieldList
RefExpr
RefPat
RefType
Rename
RestPat
RetType
ReturnExpr
SelfParam
SlicePat
SlicePatComponents
SliceType
SourceFile
Static
String
Struct
TokenTree
Trait
TryExpr
TupleExpr
TupleField
TupleFieldList
TuplePat
TupleStructPat
TupleType
TypeAlias
TypeArg
TypeBound
TypeBoundList
TypeParam
Union
Use
UseTree
UseTreeList
Variant
VariantList
Visibility
WhereClause
WherePred
WhileExpr
Whitespace
WildcardPat
YieldExpr

Enums

Adt
ArrayExprKind
AssocItem
AttrKind
BinOp
CommentPlacement
CommentShape
Effect
ElseBranch
Expr
ExternItem
FieldKind
FieldList
FormatSpecifier
GenericArg
GenericParam
Item
LiteralKind
Macro
NameLike
NameOrNameRef
Pat
PathSegmentKind
PrefixOp
Radix
RangeOp
SelfParamKind
Stmt
StructKind
Type
TypeBoundKind
VisibilityKind

Traits

ArgListOwner
AstNode

The main trait to go from untyped SyntaxNode to 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.

AstToken

Like AstNode, but wraps tokens rather than interior nodes.

AttrsOwner
DocCommentsOwner
GenericParamsOwner
HasFormatSpecifier
LoopBodyOwner
ModuleItemOwner
NameOwner
TypeBoundsOwner
VisibilityOwner