4 ms·
Why all the printf copy/pasta around the opcode enum? Can't the author use pre-processor string concatenation to write once and then leverage that to map enum
by jancsika 7y ago
Why all the printf copy/pasta around the opcode enum?
Can't the author use pre-processor string concatenation to write once and then leverage that to map enum to string and back?
At least I'm doing that in a little scripting language parser and it looks portable.
Edit: I'm actually using pre-processor string concatenation for something unrelated. You don't even need that to do the mapping.
- dmytrish 7y agoc4 is meant to be self-hosted and it does not implement a preprocessor. It was easier to re-use printf creatively.