code: boolean visitName(NodeTraversal t, Node n, Node parent) {
      // At this stage, we need to determine whether this is a leaf
      // node in an expression (which therefore needs to have a type
      // assigned for it) versus some other decorative node that we
      // can safely ignore.  Function names, arguments (children of PARAM_LIST nodes) and
      // variable declarations are ignored.
      // TODO(user): remove this short-circuiting in favor of a
      // pre order traversal of the FUNCTION, CATCH, PARAM_LIST and VAR nodes.
      Token parentNodeType = parent.getToken();
      if (parentNodeType == Token.FUNCTION
          || parentNodeType == Token.CATCH
          || parentNodeType == Token.PARAM_LIST
          || NodeUtil.isNameDeclaration(parent)
          ) {
        return false;
      }
  
      // Not need to type first key in for-in or for-of.
      if (NodeUtil.isEnhancedFor(parent) && parent.getFirstChild() == n) {
        return false;
      }
  
      JSType type = n.getJSType();
      if (type == null) {
        type = getNativeType(UNKNOWN_TYPE);
        TypedVar var = t.getTypedScope().getVar(n.getString());
        if (var != null) {
          JSType varType = var.getType();
          if (varType != null) {
            type = varType;
          }
        }
      }
      ensureTyped(n, type);
      return true;
    }
docs: Visits a NAME node.
  
  @param t The node traversal object that supplies context, such as the
  scope chain to use in name lookups as well as error reporting.
  @param n The node being visited.
  @param parent The parent of the node n.
  @return whether the node is typeable or not