src/parser/generated/regexp-tree.js
function validateUnicodeGroupName(name, state) {
  const isUnicodeName = uRe.test(name) || ucpRe.test(name);
  const isUnicodeState = (state === 'u' || state === 'xu' || state === 'u_class');

  if (isUnicodeName && !isUnicodeState) {
    throw new SyntaxError(`invalid group Unicode name "${name}", use \`u\` flag.`);
  }
}
function validateUnicodeGroupName(name, state) {
  const isUnicodeName = uRe.test(name) || ucpRe.test(name);
  const isUnicodeState = (state === 'u' || state === 'xu' || state === 'u_class');

  if (isUnicodeName && !isUnicodeState) {
    throw new SyntaxError(`invalid group Unicode name "${name}", use \`u\` flag.`);
  }
}
Validates Unicode group name.