src/language-js/parse/babel.js/createParse
function createParse(parseMethod, ...optionsCombinations) {
  return (text, parsers, opts = {}) => {
    if (
      (opts.parser === "babel" || opts.parser === "__babel_estree") &&
      isFlowFile(text, opts)
    ) {
      opts.parser = "babel-flow";
      return parseFlow(text, parsers, opts);
    }

    let combinations = optionsCombinations;
    if (opts.__babelSourceType === "script") {
      combinations = combinations.map((options) => ({
        ...options,
        sourceType: "script",
      }));
    }

    if (/#[[{]/.test(text)) {
      combinations = combinations.map((options) =>
        appendPlugins([recordAndTuplePlugin], options)
      );
    }

    const shouldEnableV8intrinsicPlugin = /%[A-Z]/.test(text);
    if (text.includes("|>")) {
      const conflictsPlugins = shouldEnableV8intrinsicPlugin
        ? [...pipelineOperatorPlugins, v8intrinsicPlugin]
        : pipelineOperatorPlugins;
      combinations = conflictsPlugins.flatMap((pipelineOperatorPlugin) =>
        combinations.map((options) =>
          appendPlugins([pipelineOperatorPlugin], options)
        )
      );
    } else if (shouldEnableV8intrinsicPlugin) {
      combinations = combinations.map((options) =>
        appendPlugins([v8intrinsicPlugin], options)
      );
    }

    const { result: ast, error } = tryCombinations(
      ...combinations.map(
        (options) => () => parseWithOptions(parseMethod, text, options)
      )
    );

    if (!ast) {
      throw createBabelParseError(error);
    }

    opts.originalText = text;
    return postprocess(ast, opts);
  };
}