Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments
Дата
Msg-id 1029569.1765564643@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments
Список pgsql-hackers
Nathan Bossart <nathandbossart@gmail.com> writes:
> Yeah, I tried to find a bug in it recently and could do little more than
> trial-and-error in the areas that seemed vaguely close (with no success).
> I'm generally critical of efforts to rewrite things from scratch, but this
> might be a case where it's the better option.

There's something to be said for that approach.  Presumably, a rewrite
could be smaller because we wouldn't need to support all the options
bsd_indent has, just the behavior PG wants.

I wonder whether it'd be possible to get rid of the need for
typedefs.list while at it.  That might be impractical --- IIRC, C
syntax is ambiguous if you don't know which identifiers are typedefs.
Still, I believe there are other indenters that get away without
that knowledge, so maybe the ambiguity isn't fatal for indentation
purposes.

With or without that nice-to-have, it'd be a lot of work with
not all that much payoff, so I'm finding it hard to recommend
that somebody go after this.  But maybe someone will find it
irresistible to scratch that itch.

            regards, tom lane



В списке pgsql-hackers по дате отправления: