return super.visitTypeParameter(node);
}
@Override
public Void visitVariableDeclaration(VariableDeclaration node) {
VariableElement element = null;
SimpleIdentifier variableName = node.getName();
if (enclosingExecutable != null) {
element = findIdentifier(enclosingExecutable.getLocalVariables(), variableName);
}
if (element == null && enclosingClass != null) {
element = findIdentifier(enclosingClass.getFields(), variableName);
}
if (element == null && enclosingUnit != null) {
element = findIdentifier(enclosingUnit.getTopLevelVariables(), variableName);
}
Expression initializer = node.getInitializer();
if (initializer != null) {
ExecutableElement outerExecutable = enclosingExecutable;
try {
if (element == null) {
// TODO(brianwilkerson) Report this internal error.
} else {
enclosingExecutable = element.getInitializer();
}
processElement(element);
processElement(enclosingExecutable);
return super.visitVariableDeclaration(node);
} finally {