swiftlang / swift-syntax

A set of Swift libraries for parsing, inspecting, generating, and transforming Swift source code.
Apache License 2.0
3.2k stars 405 forks source link

Implementation of the compiler's "extract inlinable text" #2832

Closed DougGregor closed 1 week ago

DougGregor commented 2 weeks ago

The compiler has an operation to extract "inlinable" text for use in Swift interface generation. The operation removes all "inactive" code (per a build configuration) that doesn't involve the compiler version or feature checks, as well as stripping comments and #sourceLocation.

Provide those APIs here based on swift-syntax.

DougGregor commented 2 weeks ago

@swift-ci please test

DougGregor commented 1 week ago

@swift-ci please test

DougGregor commented 1 week ago

@swift-ci please test Windows