async function parseWithOptions(filepath, text, options) {
  if (!oxcParser) {
    os.availableParallelism ??= () => os.cpus().length;
    oxcParser = await import("oxc-parser");
  }

  const result = await oxcParser.parseAsync(filepath, text, {
    preserveParens: true,
    showSemanticErrors: false,
    experimentalRawTransfer: oxcParser.rawTransferSupported(),
    ...options,
  });

  const { errors } = result;
  for (const error of errors) {
    if (
      error.severity === "Error" &&
      (error.message ===
        "A 'return' statement can only be used within a function body." ||
        /^Identifier `.*` has already been declared$/u.test(error.message))
    ) {
      continue;
    }
    throw createParseError(error, { text });
  }

  return result;
}
@param {string} filepath
@param {string} text
@param {ParserOptions} options
@returns {Promise<ParseResult>}