code: public boolean isLvalue() {
      Node parent = getParent();
      Token parentType = parent.getToken();
      switch (parentType) {
        case VAR:
        case LET:
        case CONST:
          return (nameNode.hasChildren() || isLhsOfEnhancedForExpression(nameNode));
        case DEFAULT_VALUE:
          return parent.getFirstChild() == nameNode;
        case INC:
        case DEC:
        case CATCH:
        case REST:
        case PARAM_LIST:
          return true;
        case FOR:
        case FOR_IN:
        case FOR_OF:
        case FOR_AWAIT_OF:
          return NodeUtil.isEnhancedFor(parent) && parent.getFirstChild() == nameNode;
        case ARRAY_PATTERN:
        case STRING_KEY:
        case COMPUTED_PROP:
          return NodeUtil.isLhsByDestructuring(nameNode);
        default:
          return (NodeUtil.isAssignmentOp(parent) && parent.getFirstChild() == nameNode);
      }
    }
docs: Returns whether the name node for this reference is an lvalue. TODO(tbreisacher): This method
  disagrees with NodeUtil#isLValue for "var x;" and "let x;". Consider updating it to match.