private boolean isPatternChar(int patternIndex, char c, @NotNull ErrorState errorState) {
      return patternIndex >= 0 && patternIndex < patternLength(errorState) && charAt(patternIndex, errorState) == c;
    }
private boolean isPatternChar(int patternIndex, char c, @NotNull ErrorState errorState)