Translating C macros to D
Cym13 via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jul 10 18:31:52 PDT 2017
On Monday, 10 July 2017 at 19:42:28 UTC, Jacob Carlborg wrote:
> I'm trying to come up with a generic way to translate function
> like C macros to D to be used in DStep.
>
> [...]
Is not getting rid of the macro an option? By that I mean
translating the code inside the macro (which can admitedly be
hard because it doesn't have to be semanticaly correct code due
to concatenations but most macros aren't so evil) and add a pass
of cpp to the build.
Of course nobody wants to use the C preprocessor on D code, but
it would work and I'd prefer ugly code that works and can be
refactored than no working translation at all personnaly.
More information about the Digitalmars-d
mailing list