Create a new tree from the given Swift file text.
Return the changes needed to replace a node in the syntax tree, without modifying the tree state.
Similar to replaceNode but performs a dry run without applying changes.
Return the changes needed to replace the trivia between two nodes in the syntax tree, without modifying the tree state.
Similar to replaceTriviaBetweenNodes but performs a dry run without applying changes.
Prefer using getNodeReplacementChange with the clearLeadingTrivia
or
clearTrailingTrivia
options instead of this method.
Replace a node in the tree with the given replacement text. This doesn't update the tree itself, only updates the indices of the nodes of the existing one.
Replace the text in the tree with the given replacement text.
Prefer using replaceNode instead of this method, which uses this one under the hood.
Replace the trivia between two nodes with the given replacement text.
Prefer using replaceNode with the clearLeadingTrivia
or clearTrailingTrivia
options instead of this method.
A syntax tree representation of a Swift file, focused in finding SwiftUI views.