function checkDisjointAlternatives(node) {
          if (!underAStar(node) || node.alternatives.length < 2) {
            return;
          }

          const alternatives = node.alternatives;

          const total = toNFA(alternatives[0]);
          total.removeEmptyWord();
          for (let i = 1, l = alternatives.length; i < l; i++) {
            const a = alternatives[i];
            const current = toNFA(a);
            current.removeEmptyWord();

            if (!total.isDisjointWith(current)) {
              reportError(`${rulePath}: The alternative \`${a.raw}\` is not disjoint with at least one previous alternative.`
                + ` This will cause exponential backtracking.`
                + `\n\nTo fix this issue, you have to rewrite the ${node.type} \`${node.raw}\`.`
                + ` The goal is that all of its alternatives are disjoint.`
                + ` This means that if a (sub-)string is matched by the ${node.type}, then only one of its alternatives can match the (sub-)string.`
                + `\n\nExample: \`(?:[ab]|\\w|::)+\``
                + `\nThe alternatives of the group are not disjoint because the string "a" can be matched by both \`[ab]\` and \`\\w\`.`
                + ` In this example, the pattern by easily fixed because the \`[ab]\` is a subset of the \`\\w\`, so its enough to remove the \`[ab]\` alternative to get \`(?:\\w|::)+\` as the fixed pattern.`
                + `\nIn the real world, patterns can be a lot harder to fix.`
                + ` If you are trying to make the tests pass for a pull request but can\'t fix the issue yourself, then make the pull request (or commit) anyway.`
                + ` A maintainer will help you.`
                + `\n\nFull pattern:\n${pattern}`);
            } else if (i !== l - 1) {
              total.union(current);
            }
          }
        }
Checks whether the alternatives of the given node are disjoint. If the alternatives are not disjoint
and the give node is a descendant of an effective Kleene star, then an error will be thrown.

@param {CapturingGroup | Group | LookaroundAssertion} node
@returns {void}