<div style="font-family: arial, helvetica, sans-serif"><font size="2"><div class="gmail_quote">On Fri, Jun 15, 2012 at 11:51 PM, Dmitri Gribenko <span dir="ltr"><<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Mon, Jun 11, 2012 at 8:48 AM, Manuel Klimek <<a href="mailto:klimek@google.com">klimek@google.com</a>> wrote:<br>

> Very high level remark:<br>
> I guess the reason we don't try to associate declarations with comments in<br>
> general in the AST and do the parsing of doxygen completely lazily (and<br>
> perhaps by code that doesn't need to be part of the AST libraries at all) is<br>
> the multi-declaration-spanning comment stuff?<br>
<br>
</div>If I understood your question correctly, there are a couple of reasons:<br>
1. We don't want to do extra work during normal compilation.<br>
2. Current parser is not prepared to handle tok::comment, so comments<br>
should be extracted out of the token stream and handled separately.<br></blockquote><div><br></div><div>What I mean is that in your patch it looks like the doxygen-ness of the comment is ingrained at the Sema level. Why not completely separate out the parsing of comments design wise?</div>
<div><br></div><div>Cheers,</div><div>/Manuel</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
If you mean "multi-declaration-spanning comment" = grouping declarations like:<br>
/** @defgroup ... @{ */<br>
decls...<br>
/** @} */<br>
<br>
I think that these structured comments should be properly treated as<br>
an AST on their own, which has the following nodes:<br>
* TU, which has Records, CommentGroups and Comments as children<br>
* Comment, which has a parsed comment AST<br>
* CommentGroup, which has Comments as children<br>
* Record, which has CommentGroups, Comments and Records as children.<br>
<span class="HOEnZb"><font color="#888888"><br>
Dmitri<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
--<br>
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if<br>
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>>*/<br>
</div></div></blockquote></div><br></font></div>