Make sure current context is set correctly before the member is processed and preserve it until the member is exited.
This only changes the behavior for the member itself where getCurrentMember used to return null. Same is also true for Types.
This will improve Node dump on compiler exceptions.
@@ -11,12 +11,12 @@ public class Visitor_${className} {
ProcessorPrivate processorImpl = (ProcessorPrivate) processor;
- if (processorImpl.shouldProcess${className}(node)) {
pushContext(processor, node);
+ if (processorImpl.shouldProcess${className}(node)) {
visitMembers(processorImpl, node);
- popContext(processor, node);
}
result = processorImpl.postProcess${className}(node);
+ popContext(processor, node);
return result;
}
