[GSoC] Header Generation for C/C++

Gregor Mückl gregormueckl at gmx.de
Mon Jul 29 00:23:03 UTC 2019


On Friday, 19 July 2019 at 21:08:12 UTC, Johannes Pfau wrote:
> Am Thu, 18 Jul 2019 06:41:16 +0200 schrieb Iain Buclaw:
>
>> 
>> Naturally, there should be a way to configure the style or 
>> language standards you want the code to be outputted in (and 
>> this is another reason why I think a standalone app is better).
>
> Has extending the DMD json output, then writing a tool to 
> process that json into c++ .h files been considered?
>
> This way you don't have to worry about compiler API stability 
> and you could make the c++ generation as flexible as you want 
> (and you can target other, non-C++ languages easily).

Any such external tool would have to replicate a pretty decent 
chunk of the D language AST to cover all the relevant nuances of 
definitions in D. To me, that sounds like writing a lot of code 
that duplicates stuff that's already in the compiler.


More information about the Digitalmars-d mailing list