Is anyone working on a D source code formatting tool?

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sun Jan 11 10:48:28 PST 2015


On 1/11/2015 9:45 AM, Stefan Koch wrote:
> I'm  powerful writing a parser-generator, that will be able to transform the
> generated parse-tree back into source automatically.
> writing a rule-based formatter should be pretty doable.

Formatting the AST into text is straightforward, dmd already does that for .di 
file generation.

The main problem is what to do about comments, which don't fit into the grammar.

A secondary problem is what to do when the line length limit is exceeded, such 
as for long expressions.


More information about the Digitalmars-d mailing list