[cfe-dev] Adding more HTML-related facilities in Doxygen comment parsing
David Chisnall
David.Chisnall at cl.cam.ac.uk
Mon Apr 28 08:36:06 PDT 2014
On 28 Apr 2014, at 15:14, Dmitri Gribenko <gribozavr at gmail.com> wrote:
> Parsing Doxygen is inherently intertwined with HTML parsing and
> semantic analysis. Doing filtering at the same level does not look
> out of scope and mislayered.
I agree with Alp that this looks like a case of poor layering. I only use Markdown within my doxygen comments, and so I can easily imagine a use for a tool that extracts doc comments but does not handle HTML. Similarly, I don't think it would make sense to have libclang embed a Markdown parser.
If a tool wants to be able to understand comments written in HTML, Markdown, ReST, or one of myriad other markup languages, then it will most likely also want to transform these into some internal data structure for representing structured text (NSAttributedString, whatever), and (depending on the use) may wish to do so in a way that permits editing and exporting.
There are already libraries that do this for many GUI toolkits. Recreating a subset of them in libclang doesn't seem very useful and does sound like something that would increase the code size (and attack surface) a lot if done in a way that's vaguely feature-complete way.
David
More information about the cfe-dev
mailing list