Integrated code formatter
deadalnix
deadalnix at gmail.com
Tue Jan 18 12:51:33 UTC 2022
On Tuesday, 18 January 2022 at 08:36:18 UTC, user1234 wrote:
> On Tuesday, 18 January 2022 at 03:30:53 UTC, Walter Bright
> wrote:
>> On 1/17/2022 6:06 PM, deadalnix wrote:
>>> Modern formatter, such as clang-format, use a parser, but the
>>> parser generates an IR that as nothing to do with the
>>> traditional AST you'd get out of a regular parser.
>>
>> What comes to mind is what to do with the comments.
>
> They must be kept, which is what dfmt does as it follows the
> token stream and *not* the AST.
See
https://forum.dlang.org/post/givmbzmvnjnweozrexgm@forum.dlang.org
More information about the Digitalmars-d
mailing list