Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] get AST nodes of a macros

hi all

Is it possible to get macro code converted into an AST? or is it bound to be text?

Consider the following macro, when creating an AST of the c code below, the macro is not converted into AST nodes.
Only a weak structure (IASTPreprocessorMacroDefinition) containing position where it is "called" and where to find the code for the macro is all that is provided.
Is it possible to get the AST nodes of a macro? any sugestions anyone? please..

#define BIARI_CTX_INIT2(ii,jj,ctx,tab,num) \
{ \
  for (i=0; i<ii; i++) \
  for (j=0; j<jj; j++) \
  { \
    if      (img->type==I_SLICE)  biari_init_context (&(ctx[i][j]), &(tab ## _I[num][i][j][0])); \
    else                            biari_init_context (&(ctx[i][j]), &(tab ## _P[num][i][j][0])); \
  } \
}

void foo() {
  BIARI_CTX_INIT2 (3, NUM_MB_TYPE_CTX,   mc->mb_type_contexts,     INIT_MB_TYPE,    img->model_number);
}

/Jimmie

Back to the top