src/language-js/parse/flow.js/parse
function parse(text, parsers, options = {}) {
  // Inline the require to avoid loading all the JS if we don't use it
  const { parse } = require("flow-parser");
  const ast = parse(replaceHashbang(text), parseOptions);
  const [error] = ast.errors;
  if (error) {
    throw createParseError(error);
  }

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