Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] getting preprocessed tokens for an AST node

I don't think it's possible to recover IToken 'x', but ASTName.getImageLocation() method always returns a non-null result. Don't know if this helps in your case.


On Thu, Feb 4, 2016 at 1:31 PM, Nathan Ridge <zeratul976@xxxxxxxxxxx> wrote:
Hi Alisson,

It seems from the macro definition I can get a string representing the
expansion part of the definition.

What I'm looking for, is the expansion for a particular invocation. Also,
I would like tokens, not a string.

For example, in the following code:

  #define MACRO(arg) int arg = 0;

Given the IASTName 'x', I would like to recover the IToken 'x' that the
name was created from by the parser.

Is this possible?


cdt-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top