Is there a way to access a mapped node in MAP_SRCL post-processing function?

Hi,

Macro-related question, again...

The problem is that post-processing function has following parameters:

- node - original node macro has been applied to

- outputNode - AST generated from currently mapped node

- genContext

- operationContext

Sometimes if would be useful to work with the information from the mapped node, but I couldn't find a way to access it (at least, a quick look on the genContext  / operationContext members yields nothing). Is there's a way to do this?

Best wishes,

Konstantin.

2 comments
Comment actions Permalink

Hi, the node parameter in this case is not the 'original node...'
In all functions used in generator macro, node always means 'current input node'.
The 'mapped mode' function does substitute the 'original' input node with another one. Thus, the 'node'  (i.e. current input node) is the same node as 'mapped node'.

Most likely, you were confused by type of the 'node' parm in your 'post-proc' function. It is indeed computed incorrectly - will be fixed in next MPS build.
Meanwhile you can cast node to your expected type.
Thanks for feedback, Igor.

0
Comment actions Permalink

Thank you very much for the clue - works like a charm.

Best wishes,

Konstantin.

0

Please sign in to leave a comment.