Write file at compile time?
Stefan Koch via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Apr 3 12:33:29 PDT 2017
On Monday, 3 April 2017 at 19:32:40 UTC, Stefan Koch wrote:
> On Monday, 3 April 2017 at 19:25:35 UTC, Inquie wrote:
>> On Monday, 3 April 2017 at 19:06:01 UTC, Meta wrote:
>>> On Sunday, 2 April 2017 at 19:42:52 UTC, Inquie wrote:
>>>> I would like to write the output of a manifest constant at
>>>> compile time to a file instead of console using pragma(msg).
>>>> Is this possible?
>>>
>>> D does not allow IO at compile time for security reasons.
>>
>> what if I don't care about security reasons? I'm only needing
>> it for developmental purposes.
>
> there is --vcg-ast.
> In the ~master version of dmd.
>
> it gives you everything lowered and expanded.
> given your code compiles.
sorry -vcg-ast.
use it and look for {yourfilename}.cg
More information about the Digitalmars-d-learn
mailing list