Is anyone working on a D source code formatting tool?
Jacob Carlborg via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jan 11 11:42:06 PST 2015
On 2015-01-11 19:48, Walter Bright wrote:
> 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.
clang-format seems to do a pretty good job with both of these. Comments
seem to be intact unless they're too long, then they're wrapped. It
seems to wrap at a space or other non-identifier character. Same thing
with expressions that are too long.
You should download it [1] a give it a try on some C++ code.
[1] http://llvm.org/releases/download.html
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list