original_string: private function extractLineNumbers($buffer)
      {
          $this->sourcePositions = [0 => 0];
          $prev = 0;
  
          while (($pos = strpos($buffer, "\n", $prev)) !== false) {
              $this->sourcePositions[] = $pos;
              $prev = $pos + 1;
          }
  
          $this->sourcePositions[] = strlen($buffer);
  
          if (substr($buffer, -1) !== "\n") {
              $this->sourcePositions[] = strlen($buffer) + 1;
          }
      }
code: private function extractLineNumbers($buffer)
      {
          $this->sourcePositions = [0 => 0];
          $prev = 0;
  
          while (($pos = strpos($buffer, "\n", $prev)) !== false) {
              $this->sourcePositions[] = $pos;
              $prev = $pos + 1;
          }
  
          $this->sourcePositions[] = strlen($buffer);
  
          if (substr($buffer, -1) !== "\n") {
              $this->sourcePositions[] = strlen($buffer) + 1;
          }
      }
code_tokens: private function extractLineNumbers ( $ buffer ) { $ this -> sourcePositions = [ 0 => 0 ] ; $ prev = 0 ; while ( ( $ pos = strpos ( $ buffer , "\n" , $ prev ) ) !== false ) { $ this -> sourcePositions [ ] = $ pos ; $ prev = $ pos + 1 ; } $ this -> sourcePositions [ ] = strlen ( $ buffer ) ; if ( substr ( $ buffer , - 1 ) !== "\n" ) { $ this -> sourcePositions [ ] = strlen ( $ buffer ) + 1 ; } }
docstring: Extract line numbers from buffer
  
  @param string $buffer
docstring_tokens: Extract line numbers from buffer