code: private ParseTree transformLeftHandSideExpression(ParseTree tree) {
      switch (tree.type) {
        case ARRAY_LITERAL_EXPRESSION:
        case OBJECT_LITERAL_EXPRESSION:
          resetScanner(tree);
          // If we fail to parse as an LeftHandSidePattern then
          // parseLeftHandSidePattern will take care reporting errors.
          return parseLeftHandSidePattern();
        default:
          return tree;
      }
    }
docs: Transforms a LeftHandSideExpression into a LeftHandSidePattern if possible.
  This returns the transformed tree if it parses as a LeftHandSidePattern,
  otherwise it returns the original tree.