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.