Each example can be executed by navigating into this folder and running swift run <example> <arguments>
. There is the following set of examples available:
- AddOneToIntegerLiterals: Command line tool to add 1 to every integer literal in a source file
- CodeGenerationUsingSwiftSyntaxBuilder: Code-generate a simple source file using SwiftSyntaxBuilder
- ExamplePlugin: Compiler plugin executable using
SwiftCompilerPlugin
- MacroExamples: A collection of Swift macros
Furthermore, SwiftSyntax uses SwiftSyntaxBuilder
extensively to generate its own code. That code can be found in the CodeGeneration package.
BartyCrouch: A tool to incrementally update strings files to help with localization.
Hatch: Provides a simple, extensible parser to obtain a hierarchical list of symbols.
Muter: Automated mutation testing for Swift.
Periphery: A tool to detect unused code.
Sitrep: A source code analyzer for Swift projects.
Swift AST Explorer: A Swift AST visualizer.
Swift Stress Tester: A test driver for sourcekitd
and Swift evolution.
swift-format: Formatting technology for Swift source code.
SwiftLint: A tool to enforce Swift style and conventions.