@Override
public void visit(NodeTraversal t, Node n, Node parent) {
switch (n.getType()) {
case Token.GETPROP: {
Node propNode = n.getFirstChild().getNext();
JSType jstype = getJSType(n.getFirstChild());
maybeMarkCandidate(propNode, jstype);
break;
}
case Token.OBJECTLIT:
// The children of an OBJECTLIT node are keys, where the values
// are the children of the keys.
for (Node key = n.getFirstChild(); key != null;
key = key.getNext()) {
// We only want keys that were unquoted.
// Keys are STRING, GET, SET
if (!key.isQuotedString()) {
JSType jstype = getJSType(n.getFirstChild());
maybeMarkCandidate(key, jstype);
} else {
// Ensure that we never rename some other property in a way
// that could conflict with this quoted key.
quotedNames.add(key.getString());