public boolean supportsNamedGroupRefSyntax(@Nullable final RegExpNamedGroupRef ref) {
   final RegExpLanguageHost host = findRegExpHost(ref);
   try {
     return host != null && host.supportsNamedGroupRefSyntax(ref);
   } catch (AbstractMethodError e) {
     // supportsNamedGroupRefSyntax() not present
     return false;
   }
 }