On Wednesday, 15 September 2021 at 19:59:43 UTC, james.p.leblanc wrote:
Dear All,

In attempting to learn and use code generation, it
would be useful to be able to view the source code
that gets generated.

However, with various combinations of templates, UDAs, and
mixins it has not been easy.

Is there some standard way this is done?

Optimal would be to print out the entire generated source
code to allow inspection.

Best Regards,
James

Use the `mixin` compiler flag

`dmd -mixin=<whatever-name> file.d`

Beware, this will also include **all** the mixin code from standard library and runtime.

But it's manageable, reflecting on my experience.

Reply via email to