Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyTransformationToEveryApplicableStatement ¶
func ApplyTransformationToEveryApplicableStatement[T ast.Node](input []byte, buildTransformation func(node T, parentSelector string) Transformation) []*ast.File
ApplyTransformationToEveryApplicableStatement modifies a statement in-place
Casts a node to the given type and only calls transformOrNil if the type of node is equal to the type parameter T ¶
Types ¶
type DeleteTransformation ¶
type DeleteTransformation struct { }
func NewDeleteTransformation ¶
func NewDeleteTransformation() *DeleteTransformation
func (*DeleteTransformation) ProcessNode ¶
func (t *DeleteTransformation) ProcessNode(cursor astutil.Cursor) bool
type NoopTransformation ¶
type NoopTransformation struct { }
func NewNoopTransformation ¶
func NewNoopTransformation() *NoopTransformation
func (*NoopTransformation) ProcessNode ¶
func (t *NoopTransformation) ProcessNode(_ astutil.Cursor) bool
type ReplacementTransformation ¶
func NewReplacementTransformation ¶
func NewReplacementTransformation(replacementNode ast.Node) *ReplacementTransformation
func (*ReplacementTransformation) ProcessNode ¶
func (t *ReplacementTransformation) ProcessNode(cursor astutil.Cursor) bool
type ScopeLayer ¶
type ScopeStack ¶
type ScopeStack struct { collection.Stack[ScopeLayer] }
func (ScopeStack) ScopeOfCurrentPosition ¶
func (s ScopeStack) ScopeOfCurrentPosition(cursor astutil.Cursor) string
func (ScopeStack) String ¶
func (s ScopeStack) String() string
type Transformation ¶
Click to show internal directories.
Click to hide internal directories.