code: private function clearRangeLeaveComments(Tokens $tokens, $indexStart, $indexEnd)
      {
          for ($i = $indexStart; $i <= $indexEnd; ++$i) {
              $token = $tokens[$i];
  
              if ($token->isComment()) {
                  continue;
              }
  
              if ($token->isWhitespace("\n\r")) {
                  continue;
              }
  
              $tokens->clearAt($i);
          }
      }
docs: Clear tokens in the given range unless they are comments.
  
  @param Tokens $tokens
  @param int    $indexStart
  @param int    $indexEnd