adamdruppe / adrdox

41 stars 15 forks source link

Comments appearing on the same line to the right of a declaration not parsed correctly #30

Open PetarKirov opened 6 years ago

PetarKirov commented 6 years ago

According to https://dlang.org/spec/ddoc#parsing:

  1. [..] If the documentation comment appears on the same line to the right of a declaration, it applies to that.

For example: source: https://github.com/dlang/phobos/blob/f4aec67df5fd5a4f010edc79a22fe570b3691516/std/experimental/logger/core.d#L686-L701 ardox: http://dpldocs.info/experimental-docs/std.experimental.logger.core.LogLevel.html ddoc: https://dlang.org/phobos/std_experimental_logger_core.html#.LogLevel ddox: https://dlang.org/library-prerelease/std/experimental/logger/core/log_level.html

For context, see: https://github.com/dlang/phobos/pull/6678.

adamdruppe commented 6 years ago

OK, I think I fixed this locally but I'll double check when I'm back from my honeymoon. (I have a lot of parser fixes pending a push btw)

adamdruppe commented 6 years ago

This should fix it: https://github.com/adamdruppe/adrdox/commit/02eb1a0fe997ccb1289fb29522457f77b83baa6e

i will push new code to the dpldocs.info generator hopefully tomorrow and rebuild phobos, but I already rebuild std.experimental.logger and here is the result:

http://dpldocs.info/experimental-docs/std.experimental.logger.core.LogLevel.html

looks good now. just need to regression test before I actually push the rest of the way to production and i am out of time tonight.

PetarKirov commented 6 years ago

Nice work, Adam! Do you have some sort of CI diff tool like DAutoTest that can show the diff between two versions of the doc engine or two versions of library?

adamdruppe commented 6 years ago

On Wed, Aug 29, 2018 at 10:29:34PM -0700, Petar Kirov wrote:

Do you have some sort of CI diff tool like DAutoTest that can show the diff between two versions of the doc engine or two versions of library?

No, I just run it on a bunch of files I have here (including some test.d's and the adrdox syntax documentation that does some weirder edge cases but nothing formal) and see if it is looking ok.