Is it possible to obtain textual representation of an arbitary code?

timotheecour timothee.cour2 at gmail.com
Fri Jan 26 18:52:35 UTC 2018


On Friday, 26 January 2018 at 11:18:21 UTC, Oleksii Skidan wrote:
> Hi,
>
> I wonder if it's possible to convert D language code into a 
> string at compile time? C/C++ preprocessor has this feature 
> built-in: `#` preprocessing operator allows converting a macro 
> argument into a string constant. See the following code snippet 
> for example:


See feature request I suggested here:

https://forum.dlang.org/thread/mailman.2377.1516230845.9493.digitalmars-d@puremagic.com __ARGS__ : allow access to (stringified) arguments, as C's `#arg` macro



More information about the Digitalmars-d-learn mailing list