[cfe-dev] Problems and more problems with the python bindings

Gregory Szorc gregory.szorc at gmail.com
Tue Jan 10 23:36:58 PST 2012

On 1/9/2012 12:15 PM, Joxean Koret wrote:
> 1) Is there an easy way to retrieve this information (the relevant
> operator for BINARY_OPERATOR, UNARY_OPERATOR, *_LITERAL, etc...) using
> the current python bindings?

I can't speak for whether there is a better way this could be done
through the cursor interface. However, it would be possible to map that
cursor to a token by obtaining the cursor's location then querying for
the token at that source location.

Unfortunately, the current Python bindings don't support the token API.
However, I have a preliminary implementation at
that does. I'm planning to submit the patch once it is complete (I just
have tests to write). Feel free to use my code until something official


More information about the cfe-dev mailing list