I have been able to build a functional swift refactoring tool using the instructions given in https://github.com/apple/swift/tree/master/lib/Syntax. This has been built using Xcode (as given by the instructions in the link). In order to be able to distribute the tool to other developers, it is easier if I can package the tool inside the locally maintained custom swift toolchain. The build system for swift seems quite complex. For example, if I want to put the Renamer
refactoring file inside the toolchain,
a) Which directory is more appropriate? tools
? utils
?
b) How should the makefiles be updated to build the tool.
c) How can I ensure that the SyntaxRewriter and other SwiftSyntax libraries are properly referenced while building the tool?
If there are some examples for this, please let me know.