[GCC-XML] get source of parsed C++ class
Roman Yakovenko
roman.yakovenko at gmail.com
Wed Nov 26 14:50:09 EST 2008
On Wed, Nov 26, 2008 at 9:03 PM, Patrick Meier <meierpatrick at ymail.com> wrote:
> Hello,
Good evening.
> I am parsing a bunch of header files with gccxml (pygccxml to be precise) and need to operate on the source of certain classes.
>
> Can I get information back from gccxml (or pygccxml) that allows me to retrieve the positions where in the header file the declaration of a certain class begins or ends?
You can get the beginning of the declaration only.
Every declaration has "location" property
http://www.language-binding.net/pygccxml/apidocs/pygccxml.declarations.declaration.declaration_t-class.html
, which provide you access to full file name and line (
http://www.language-binding.net/pygccxml/apidocs/pygccxml.declarations.declaration.location_t-class.html
) as reported by GCC-XML.
> Or retrieve the complete source of this class as a string?
No. A patch is welcome :-)
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
More information about the gccxml
mailing list