function retrieveRules(language, { name }) {
  // first we need to get the language compiled so we have
  // access to the raw regex
  hljs.highlight("", {language: name});
  return regexFor(language, { context: name, depth: 0 });
}
A map for a regex pattern to whether or not it it vulnerable to polynomial backtracking.

@type {Record<string, boolean>}