You might want to check out nimterop's rendering of C enums. Initially, it generated a regular Nim enum but due to various restrictions, we now use distinct ints instead and it works quite well.
For example: [soloud_h.c](https://github.com/jarikomppa/soloud/blob/master/include/soloud_c.h#L39) looks like [this](https://travis-ci.org/nimterop/nimterop/jobs/543023791#L3015). This method supports holes, out of order and repeat instances. This is especially useful with C enums that use bit shifts which can easily be out of order. [types.nim](https://github.com/nimterop/nimterop/blob/master/nimterop/types.nim#L35) makes this possible.
