Robbepop / enum-tag

Proc. macro to generate C-like `enum` tags.
MIT License
13 stars 0 forks source link

Implement `struct` support for `#[derive(EnumTag)]` #5

Open Robbepop opened 1 year ago

Robbepop commented 1 year ago

Even though this might not seem very useful on the first sight this can make life simpler for generated code since no distinction needs to be done between enum, struct and maybe even union types. For struct and union types we could simply generate a unit struct as its tag type and return that for all instances.