Contributor
Fredrik Wieczerkowski

Bootstrapping SwiftSyntaxBuilder


Mentors
Alex Hoppen
Organization
Swift
Technologies
swift
Topics
compilers, tooling, code generation, Bootstrapping
Providing excellent tooling for Swift often involves operating on Swift syntax trees directly. The swift-syntax library serves this purpose by providing a Swift representation of syntax trees, along with facilities to parse and generate Swift code. To make code generation especially convenient, the library includes a Domain-Specific Language (DSL) for building syntax trees that, however, currently relies on external tooling to generate a large part of its own definitions. To test the DSL on a non-trivial codebase and to make it production-ready, we will rewrite the syntax builder in itself, generating its sources using its own DSL and thereby bootstrapping its implementation.