DScanner is ready for use

Brian Schott briancschott at gmail.com
Fri Aug 2 11:41:37 PDT 2013


On Friday, 2 August 2013 at 18:12:15 UTC, Tofu Ninja wrote:
> I will look into adding it my self if I get some time, but I 
> don't think I will need to use this for a while. For what I 
> want it for, there is a lot of legwork to be done before I get 
> around to needing this.

The XML output is handled by this class:
https://github.com/Hackerpilot/Dscanner/blob/master/astprinter.d
It shouldn't be much more difficult than changing the print 
statements.

> Also roughly how difficult would it be to re-create source code 
> from the xml? And does the xml preserve comments and if so does 
> it do anything with ddoc?

Aside from the comments, it should be possible to recreate the 
source from the AST. If it's not, there's a bug in the AST 
output. Comments are skipped when syntax checking or generating 
the AST.


More information about the Digitalmars-d-announce mailing list