[cfe-dev] Regarding parsing of comment in Clang
James Dennett
james.dennett at gmail.com
Fri Aug 2 11:32:56 PDT 2013
On Fri, Aug 2, 2013 at 8:58 AM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
> On Fri, Aug 2, 2013 at 4:58 AM, Arpit Sancheti
> <arpit.sancheti2002 at gmail.com> wrote:
>> Respected,
>>> Current comment parsing can only pick up comments that:
>>> 1. immediately precede a declaration
>>> 2. have special starting sequence: /// for line comments and /** ...
>>> */ for block comments.
>>
>>> (2) is easy to correct
>> can you tell me how it can be done and also does writing the function
>> ASTContext::getCommentForDecl(
>> ) in the our parser will retrieve the comment or something else is also to
>> be done.
>
> Look for calls to RawComment::isDocumentation().
Or use the existing option to extract all comments.
clang::CommentOptions::ParseAllComments is a good starting point for
exploring that.
-- James
More information about the cfe-dev
mailing list