How to create a enum-like struct macro?

I’m thinking of something like this:

@SynthesizeRawValues
extension LangCode {
  private static let allRawValuesForMacro: [String] = ["en", "es", …]
}

It’s strictly more work for the compiler, but could be enough better for a human that you prefer it.