@Nullable
  @SuppressWarnings("SSBasedInspection")
  private TextMateCapture @Nullable [] loadCaptures(@NotNull Plist captures,
                                                    @NotNull SyntaxNodeDescriptor parentNode,
                                                    @NotNull Interner<CharSequence> interner) {
    Int2ObjectOpenHashMap<TextMateCapture> map = new Int2ObjectOpenHashMap<>();
    int maxGroupIndex = -1;
    for (Map.Entry<String, PListValue> capture : captures.entries()) {
      try {
        int index = Integer.parseInt(capture.getKey());
        Plist captureDict = capture.getValue().getPlist();
        PListValue captureName = captureDict.getPlistValue(Constants.NAME_KEY);
        if (captureName != null) {
          map.put(index, new TextMateCapture.Name(interner.intern(captureName.getString())));
        }
        else {
          map.put(index, new TextMateCapture.Rule(loadRealNode(captureDict, parentNode, interner)));
        }
        maxGroupIndex = Math.max(maxGroupIndex, index);
      }
      catch (NumberFormatException ignore) {
      }
    }
    if (maxGroupIndex < 0 || map.isEmpty()) {
      return null;
    }
    TextMateCapture[] result = new TextMateCapture[maxGroupIndex + 1];
    map.int2ObjectEntrySet().fastForEach(e -> result[e.getIntKey()] = e.getValue());
    return result;
  }
@Nullable
  @SuppressWarnings("SSBasedInspection")
  private TextMateCapture @Nullable [] loadCaptures(@NotNull Plist captures,
                                                    @NotNull SyntaxNodeDescriptor parentNode,
                                                    @NotNull Interner<CharSequence> interner)