On Mon, Jun 11, 2012 at 8:48 AM, Manuel Klimek <[email protected]> wrote:
> Very high level remark:
> I guess the reason we don't try to associate declarations with comments in
> general in the AST and do the parsing of doxygen completely lazily (and
> perhaps by code that doesn't need to be part of the AST libraries at all) is
> the multi-declaration-spanning comment stuff?

If I understood your question correctly, there are a couple of reasons:
1. We don't want to do extra work during normal compilation.
2. Current parser is not prepared to handle tok::comment, so comments
should be extracted out of the token stream and handled separately.

If you mean "multi-declaration-spanning comment" = grouping declarations like:
/** @defgroup ... @{ */
decls...
/** @} */

I think that these structured comments should be properly treated as
an AST on their own, which has the following nodes:
* TU, which has Records, CommentGroups and Comments as children
* Comment, which has a parsed comment AST
* CommentGroup, which has Comments as children
* Record, which has CommentGroups, Comments and Records as children.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <[email protected]>*/
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to