@ApiStatus.Experimental
  @NotNull
  public static MessageFormatResult checkFormat(@NotNull String pattern) {
    if (pattern.isEmpty()) {
      return new MessageFormatResult(true, List.of(), List.of());
    }
    MessageHolder holder = parseMessageHolder(pattern);
    List<MessageFormatError> errors = holder.getErrors();
    List<MessageFormatPart> parts = holder.getParts();
    for (MessageFormatPart part : parts) {
      if (part.getParsedType() == MessageFormatParsedType.STRING) {
        String string = part.getText();
        List<MessageFormatError> doubleQuoteErrors = checkQuote(string);
        //rearrange quote errors, because quotes can be merged
        errors.addAll(rearrangeErrors(doubleQuoteErrors, pattern, string, part.start));
      }
    }
    List<MessageFormatPlaceholder> placeholderIndexes = new ArrayList<>();
    for (MessageFormatPart part : parts) {
      if (part.getParsedType() == MessageFormatParsedType.FORMAT_ELEMENT &&
          part.getMessageFormatElement() != null &&
          part.getMessageFormatElement().getIndex() != null) {
        placeholderIndexes.add(new MessageFormatPlaceholder(part.getMessageFormatElement().getIndex(),
                                                            new TextRange(part.start, part.start + part.text.length()),
                                                            part.getMessageFormatElement().formatType == null &&
                                                            part.getMessageFormatElement().currentPart == MessageFormatElementPart.ARGUMENT_INDEX));
      }
    }
    return new MessageFormatResult(errors.isEmpty(), errors, placeholderIndexes);
  }
@ApiStatus.Experimental
  @NotNull
  public static MessageFormatResult checkFormat(@NotNull String pattern)