Skip to main content

Module visiting

Module visiting 

Source
Expand description

Contains logic that makes viewing and transform parts of AST trivial through the visitor pattern

Structs§

Annex
Chain
Contains ChainVariables which signal the position in the AST
VisitOptions
Options for behavior when visiting AST. Customizable behavior is important for analysis
Visitors
A utility type which implements VisitorReceiver. Use for running a bunch of different immutable visitors over a immutable AST. Used for simple analysis
VisitorsMut
A utility type which implements VisitorMutReceiver. Use for running a bunch of different mutable visitors over a mutable AST. Therefore can remove, add or change AST

Enums§

BlockItem
Wrapper type for StatementOrDeclaration. Needed because crate::Statement doesn’t come under StatementOrDeclaration in the case of crate::BlockOrSingleStatement
BlockItemMut
Wrapper type for StatementOrDeclaration. Needed because crate::Statement doesn’t come under StatementOrDeclaration in the case of crate::BlockOrSingleStatement
ChainVariable
ImmutableVariableOrProperty
MutableVariableOrProperty

Traits§

SelfVisitable
Yielded during visiting AST. Might not be 1:1 with AST and include a wrapping type
SelfVisitableMut
Yielded during visiting AST. Might not be 1:1 with AST and include a wrapping type
Visitable
For something to visitable it can visit all nested fields.
Visitor
A visitor over something which is hooked/is SelfVisitable with some generic Data
VisitorMut
A visitor over something which is hooked/is SelfVisitableMut with some Data
VisitorMutReceiver
These are a receiver traits of the visitor
VisitorReceiver
Something which has a bunch of callbacks for AST