private @Nullable FList<TextRange> matchWildcards(int patternIndex,
                                        int nameIndex,
                                        @NotNull ErrorState errorState) {
      if (nameIndex < 0) {
        return null;
      }
      if (!isWildcard(patternIndex)) {
        if (patternIndex == patternLength(errorState)) {
          return FList.emptyList();
        }
        return matchFragment(patternIndex, nameIndex, errorState);
      }

      do {
        patternIndex++;
      } while (isWildcard(patternIndex));

      if (patternIndex == patternLength(errorState)) {
        // the trailing space should match if the pattern ends with the last word part, or only its first hump character
        if (isTrailingSpacePattern(errorState) && nameIndex != myName.length() && (patternIndex < 2 || !isUpperCaseOrDigit(charAt(
          patternIndex - 2, errorState)))) {
          int spaceIndex = myName.indexOf(' ', nameIndex);
          if (spaceIndex >= 0) {
            return FList.singleton(new Range(spaceIndex, spaceIndex + 1, 0));
          }
          return null;
        }
        return FList.emptyList();
      }

      FList<TextRange> ranges = matchFragment(patternIndex, nameIndex, errorState);
      if (ranges != null) {
        return ranges;
      }

      return matchSkippingWords(patternIndex, nameIndex, true, errorState);
    }
private @Nullable FList<TextRange> matchWildcards(int patternIndex,
                                        int nameIndex,
                                        @NotNull ErrorState errorState)