www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - A site like cppinsights.io, but for D?

reply Alexander Nicholi <alex arqadium.com> writes:
I just ran across this website <https://cppinsights.io/> that 
does some pretty interesting deconstructions of C++ code, and I 
was wondering if anything like this exists for D. Apparently the 
main purpose is source-to-source transformation to better show 
what the compiler sees in your code before it gets turned into IR 
or assembler or whatever.
Aug 26 2018
next sibling parent reply drug <drug2004 bk.ru> writes:
On 26.08.2018 20:39, Alexander Nicholi wrote:
 I just ran across this website <https://cppinsights.io/> that does some 
 pretty interesting deconstructions of C++ code, and I was wondering if 
 anything like this exists for D. Apparently the main purpose is 
 source-to-source transformation to better show what the compiler sees in 
 your code before it gets turned into IR or assembler or whatever.
visit https://run.dlang.io/ and use AST button to get AST
Aug 26 2018
parent Dennis <dkorpel gmail.com> writes:
On Sunday, 26 August 2018 at 17:47:56 UTC, drug wrote:
 visit https://run.dlang.io/ and use AST button to get AST
And to do the same offline, pass the -vcg-ast flag to dmd.
Aug 26 2018
prev sibling parent Stefan Koch <uplink.coder googlemail.com> writes:
On Sunday, 26 August 2018 at 17:39:22 UTC, Alexander Nicholi 
wrote:
 I just ran across this website <https://cppinsights.io/> that 
 does some pretty interesting deconstructions of C++ code, and I 
 was wondering if anything like this exists for D. Apparently 
 the main purpose is source-to-source transformation to better 
 show  what the compiler sees in your code before it gets turned 
 into IR or assembler or whatever.
Hi AS others habe said before, You can usw -vcg-ast which'll give you a d-ish Repräsentation of what the Compiler will put in the object-file. AS I am the author oft that feature feel free to tell me if information you need is missing.
Aug 27 2018