On Monday, 16 April 2018 at 11:20:51 UTC, Atila Neves wrote:

You can use the C macros in the headers that you #include in your dpp file.

dstep has a lot of code for translating macros. I don't want to translate macros at all, but it's deeply intertwined with translating everything else.

There's a command line switch to disable that, `--translate-macros=false`. Or, alternatively, run the preprocessor first.

I can't remember the specifics, but dstep by default ignores declarations from other headers because the idea is to translate this one particular header.

That's a simple change: replace these lines [1] with `return false;`. If that's something you need we can make it configurable.

[1] https://github.com/jacob-carlborg/dstep/blob/97870ac5167f09e8acf17f8754c32636492b237f/dstep/translator/Translator.d#L326-L329

--
/Jacob Carlborg

Reply via email to