@NotNull
  private static MessageHolder parseChoice(@NotNull String patten) {
    MessageHolder holder = new MessageHolder(patten);
    holder.parts.clear();
    holder.startNumberElement();
    List<Double> selectors = new ArrayList<>();
    List<Integer> startIndexes = new ArrayList<>();
    startIndexes.add(0);
    while (holder.hasNext() && !holder.hasRuntimeError) {
      char ch = holder.nextPool();
      if (ch == '\'') {
        if (holder.hasNext() && holder.nextPeek() == '\'') {
          holder.addChar(ch);
          holder.nextPool();
        }
        else {
          holder.inQuote = !holder.inQuote;
        }
      }
      else if (holder.inQuote) {
        holder.addChar(ch);
      }
      //finish selector
      else if (ch == '<' || ch == '#' || ch == '≤') {
        MessageFormatPart part = holder.getLastPart();
        String selector = part.text.toString();
        if (part.getParsedType() != MessageFormatParsedType.NUMBER || selector.isEmpty()) {
          holder.addError(MessageFormatErrorType.SELECTOR_NOT_FOUND, holder.current, holder.current + 1);
        }
        else if (!selector.equals("∞") && !selector.equals("-∞")) {
          try {
            double currentSelector = Double.parseDouble(selector);
            if (ch == '<') {
              currentSelector = ChoiceFormat.nextDouble(currentSelector);
            }
            if (!selectors.isEmpty()) {
              Double previousSelector = selectors.get(selectors.size() - 1);
              if (previousSelector >= currentSelector) {
                holder.addError(MessageFormatErrorType.INCORRECT_ORDER_CHOICE_SELECTOR, holder.current - selector.length(), holder.current);
              }
            }
            selectors.add(currentSelector);
          }
          catch (NumberFormatException e) {
            holder.addError(MessageFormatErrorType.INCORRECT_CHOICE_SELECTOR, holder.current - selector.length(), holder.current);
          }
        }
        startIndexes.add(holder.current + 1);
        holder.startStringElement();
      }
      else if (ch == '|') {
        startIndexes.add(holder.current + 1);
        holder.startNumberElement();
      }
      else {
        holder.addChar(ch);
      }
    }
    List<MessageFormatPart> parts = new ArrayList<>(holder.getParts());
    holder.parts.clear();
    for (int i = 0; !holder.hasRuntimeError && i < parts.size(); i++) {
      MessageFormatPart part = parts.get(i);
      String currentSubPattern = part.getText();
      if (part.getParsedType() == MessageFormatParsedType.STRING && currentSubPattern.indexOf('{') >= 0) {
        holder.merge(parseMessageHolder(currentSubPattern), startIndexes.get(i));
      }
      else {
        holder.parts.add(part);
      }
    }
    return holder;
  }

  en
@NotNull
  private static MessageHolder parseChoice(@NotNull String patten)