src/language-js/parse/acorn.js/parse
function parse(text, parsers, options = {}) {
  const { result: ast, error: moduleParseError } = tryCombinations(
    () => parseWithOptions(text, /* sourceType */ "module"),
    () => parseWithOptions(text, /* sourceType */ "script")
  );

  if (!ast) {
    // throw the error for `module` parsing
    throw createParseError(moduleParseError);
  }

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