We actually all kinda hate the current enum style.
It's not correct, due to various reasons, to use Rust enums for every case... we want to only do that in cases where we verify it's correct, like NodeTag. Otherwise it's UB.
A nicer version that looks like Rust enums when you use them but has the same types as we currently use and doesn't have weird UB implications is EnumVariation::ModuleConsts.
Hypothetically, if people wanted we could make a slightly more graceful changeover of taking every enum and running a callback which then generates the old enum style but tagged with #[deprecated(message = "use EnumName::Variant instead"]. I'd accept such a PR. I probably won't write it that way myself. If anyone wants to do that, now is the time, and you'd probably be best-off doing it via ParseCallbacks::enum_variant_{name,behavior} (but don't actually do anything, just record things so you can emit the extra constants later).
We actually all kinda hate the current enum style.
It's not correct, due to various reasons, to use Rust enums for every case... we want to only do that in cases where we verify it's correct, like NodeTag. Otherwise it's UB.
A nicer version that looks like Rust enums when you use them but has the same types as we currently use and doesn't have weird UB implications is
EnumVariation::ModuleConsts.Hypothetically, if people wanted we could make a slightly more graceful changeover of taking every enum and running a callback which then generates the old enum style but tagged with
#[deprecated(message = "use EnumName::Variant instead"]. I'd accept such a PR. I probably won't write it that way myself. If anyone wants to do that, now is the time, and you'd probably be best-off doing it viaParseCallbacks::enum_variant_{name,behavior}(but don't actually do anything, just record things so you can emit the extra constants later).