code: function startsWithNoLookaheadToken(node, forbidFunctionClassAndDoExpr) {
    node = getLeftMost(node);
    switch (node.type) {
      case "FunctionExpression":
      case "ClassExpression":
      case "DoExpression":
        return forbidFunctionClassAndDoExpr;
      case "ObjectExpression":
        return true;
      case "MemberExpression":
        return startsWithNoLookaheadToken(
          node.object,
          forbidFunctionClassAndDoExpr
        );
      case "TaggedTemplateExpression":
        if (node.tag.type === "FunctionExpression") {
          // IIFEs are always already parenthesized
          return false;
        }
        return startsWithNoLookaheadToken(node.tag, forbidFunctionClassAndDoExpr);
      case "CallExpression":
        if (node.callee.type === "FunctionExpression") {
          // IIFEs are always already parenthesized
          return false;
        }
        return startsWithNoLookaheadToken(
          node.callee,
          forbidFunctionClassAndDoExpr
        );
      case "ConditionalExpression":
        return startsWithNoLookaheadToken(
          node.test,
          forbidFunctionClassAndDoExpr
        );
      case "UpdateExpression":
        return (
          !node.prefix &&
          startsWithNoLookaheadToken(node.argument, forbidFunctionClassAndDoExpr)
        );
      case "BindExpression":
        return (
          node.object &&
          startsWithNoLookaheadToken(node.object, forbidFunctionClassAndDoExpr)
        );
      case "SequenceExpression":
        return startsWithNoLookaheadToken(
          node.expressions[0],
          forbidFunctionClassAndDoExpr
        );
      case "TSAsExpression":
        return startsWithNoLookaheadToken(
          node.expression,
          forbidFunctionClassAndDoExpr
        );
      default:
        return false;
    }
  }
docs: Tests if an expression starts with `{`, or (if forbidFunctionClassAndDoExpr holds) `function`, `class`, or `do {}`. Will be overzealous if there's already necessary grouping parentheses.