Closed rauhul closed 2 weeks ago
Synced to Apple’s issue tracker as rdar://139474306
@ahoppen I was planning to take a look at this soon. I could do it entirely inside swift-format, but since ExperimentalFeatures
is just a bitmask, we'd have to manually keep the string names consistent.
So I'm thinking of updating swift-syntax codegen to generate an ExperimentalFeature.init?(String)
initializer that we could use. The initializer isn't really needed by swift-syntax itself but it would at least ensure that they're always in sync.
Thoughts?
I've created https://github.com/swiftlang/swift-syntax/pull/2895 for the bits needed to translate the strings to option set values.
See title, when trying to format code using value generics, I had to patch the formatter to pass
.valueGenerics
to swift-syntax instead of being able to use a CLI flag.