[cfe-dev] Source code documentation
Stefan Seefeld
stefan.seefeld at gmail.com
Tue Mar 9 13:55:39 PST 2010
On 03/09/2010 04:42 PM, Douglas Gregor wrote:
>> Yes. At present the parser attaches comments to the next declaration it finds, from where Synopsis then picks it up to process it further (extract processing instructions, documentation, whatever).
>>
> Okay. We don't really have this functionality in Clang yet. Comments are passed through to the AST consumer, and we have a hack that tries to find the comment associated with a declaration after the fact, but this will need work.
>
OK.
>> Also, in one mode of operation Synopsis wants to get a position-correct picture of the entire preprocessed source file, so it can generate a hyperlinked and otherwise styled version of it. Does CLang provide this level of detail ?
>>
>
> Internally, yes. There isn't enough information exposed via the CIndex interface to do this (but I'd support extending CIndex in this direction).
>
OK. Without knowing CIndex, I'm not sure how useful it is to support
such different levels of details through the same representation. For
example, to generate a hyperlinked source tree, I'd operate on something
close to the parse tree, i.e. individual tokens.
But for the documentation, a much more high-level view is useful, such
as a syntax tree or even a semantic graph.
Do you think all of those will be represented by CIndex, eventually ?
Thanks,
Stefan
--
...ich hab' noch einen Koffer in Berlin...
More information about the cfe-dev
mailing list