Is there a way to programmatically evaluate a macro?

47 Views Asked by At

For example, let us take this code:

Method m()
{
    $$$someMacro
}

Or:

Method m(foo as whatever)
{
   $$$otherMacro(foo)
}

Provided that I can extract someMacro and otherMacro from the code samples above, is there a way to programmatically expand them?

1

There are 1 best solutions below

2
On BEST ANSWER

No. Macro can only be resolved at compile time. Since what macro expands into may depend on where in code macro is placed you can't expand one macro without context.