code: public static boolean isLhsByDestructuring(Node n) {
      switch (n.getToken()) {
        case NAME:
        case GETPROP:
        case GETELEM:
          return isLhsByDestructuringHelper(n);
        default:
          return false;
      }
    }
docs: Returns true if the node is a lhs value of a destructuring assignment.
  
  <p>For example, x in {@code var [x] = [1];}, {@code var [...x] = [1];}, and {@code var {a: x} =
  {a: 1}} or a.b in {@code ([a.b] = [1]);} or {@code ({key: a.b} = {key: 1});}