> Maybe c2nim could be used to auto-convert the body of a C macro to Nim code..
c2nim does that, yes. No idea why you are all so keen on using a C preprocessor to throw away lots of useful information. Yes, it can be hard to get the C(++) code through c2nim. But it always can be done and the harder part is to provide an idiomatic API on top of the wrapper.