private static boolean isComment(@NotNull IElementType type) {
    ParserDefinition def = LanguageParserDefinitions.INSTANCE.forLanguage(type.getLanguage());
    return def != null && def.getCommentTokens().contains(type);
  }
private static boolean isComment(@NotNull IElementType type)