Avatar
public protocol RefactoringProvider { /// The type of syntax this refactoring action accepts. associatedtype Input: SyntaxProtocol = SourceFileSyntax /// The type of syntax this refactoring action returns. associatedtype Output: SyntaxProtocol = SourceFileSyntax /// Contextual information used by the refactoring action. associatedtype Context = Void /// Perform the refactoring action on the provided syntax node. /// /// - Parameters: /// - syntax: The syntax to transform. /// - context: Contextual information used by the refactoring action. /// - Returns: The result of applying the refactoring action, or `nil` if the /// action could not be performed. static func refactor(syntax: Self.Input, in context: Self.Context) -> Self.Output? } なんか入力と出力がワンファイルな雰囲気(Output = SourceFileSyntax)はあるけどどうなんだろう (edited)