private boolean isTrailingSpacePattern(@NotNull ErrorState errorState) {
      return isPatternChar(patternLength(errorState) - 1, ' ', errorState);
    }
private boolean isTrailingSpacePattern(@NotNull ErrorState errorState)