Re: DMD AST Docs/Reference or Dumper?

2015-04-08 Thread Kai Nacke via Digitalmars-d

On Tuesday, 7 April 2015 at 15:58:49 UTC, bitwise wrote:
I'm trying to add some compile-time function generation to dmd, 
but wasn't sure exactly how to click all the little legos 
together.


Is there any documentation or reference for the DMD AST? Or 
maybe some examples somewhere of what an AST may look like for 
a given function?


As a last resort, I was about to start converting the 
ToJsonVisitor to a ToAstDumpVisitor, but as you may have 
guessed, I am not particularly excited about this venture. Does 
source code exist anywhere for this already?


Thanks


Hi bitwise,

I am not aware of such a visitor but would find it helpful, too.

Regards,
Kai


DMD AST Docs/Reference or Dumper?

2015-04-07 Thread bitwise via Digitalmars-d
I'm trying to add some compile-time function generation to dmd, 
but wasn't sure exactly how to click all the little legos 
together.


Is there any documentation or reference for the DMD AST? Or maybe 
some examples somewhere of what an AST may look like for a given 
function?


As a last resort, I was about to start converting the 
ToJsonVisitor to a ToAstDumpVisitor, but as you may have guessed, 
I am not particularly excited about this venture. Does source 
code exist anywhere for this already?


Thanks