original_string: public function parse($filename, ProjectDescriptorBuilder $builder)
      {
          if (class_exists('phpDocumentor\Event\Dispatcher')) {
              Dispatcher::getInstance()->dispatch(
                  'parser.file.pre',
                  PreFileEvent::createInstance($this)->setFile($filename)
              );
          }
          $this->log('Starting to parse file: ' . $filename);
  
          try {
              $file = $this->createFileReflector($builder, $filename);
              if (!$file) {
                  $this->log('>> Skipped file ' . $filename . ' as no modifications were detected');
                  return;
              }
  
              $file->process();
              $builder->buildFileUsingSourceData($file);
              $this->logErrorsForDescriptor($builder->getProjectDescriptor()->getFiles()->get($file->getFilename()));
          } catch (Exception $e) {
              $this->log(
                  '  Unable to parse file "' . $filename . '", an error was detected: ' . $e->getMessage(),
                  LogLevel::ALERT
              );
          }
      }
code: public function parse($filename, ProjectDescriptorBuilder $builder)
      {
          if (class_exists('phpDocumentor\Event\Dispatcher')) {
              Dispatcher::getInstance()->dispatch(
                  'parser.file.pre',
                  PreFileEvent::createInstance($this)->setFile($filename)
              );
          }
          $this->log('Starting to parse file: ' . $filename);
  
          try {
              $file = $this->createFileReflector($builder, $filename);
              if (!$file) {
                  $this->log('>> Skipped file ' . $filename . ' as no modifications were detected');
                  return;
              }
  
              $file->process();
              $builder->buildFileUsingSourceData($file);
              $this->logErrorsForDescriptor($builder->getProjectDescriptor()->getFiles()->get($file->getFilename()));
          } catch (Exception $e) {
              $this->log(
                  '  Unable to parse file "' . $filename . '", an error was detected: ' . $e->getMessage(),
                  LogLevel::ALERT
              );
          }
      }
code_tokens: public function parse ( $ filename , ProjectDescriptorBuilder $ builder ) { if ( class_exists ( 'phpDocumentor\Event\Dispatcher' ) ) { Dispatcher :: getInstance ( ) -> dispatch ( 'parser.file.pre' , PreFileEvent :: createInstance ( $ this ) -> setFile ( $ filename ) ) ; } $ this -> log ( 'Starting to parse file: ' . $ filename ) ; try { $ file = $ this -> createFileReflector ( $ builder , $ filename ) ; if ( ! $ file ) { $ this -> log ( '>> Skipped file ' . $ filename . ' as no modifications were detected' ) ; return ; } $ file -> process ( ) ; $ builder -> buildFileUsingSourceData ( $ file ) ; $ this -> logErrorsForDescriptor ( $ builder -> getProjectDescriptor ( ) -> getFiles ( ) -> get ( $ file -> getFilename ( ) ) ) ; } catch ( Exception $ e ) { $ this -> log ( '  Unable to parse file "' . $ filename . '", an error was detected: ' . $ e -> getMessage ( ) , LogLevel :: ALERT ) ; } }
docstring: Parses the file identified by the given filename and passes the resulting FileDescriptor to the ProjectBuilder.
  
  @param string                   $filename
  @param ProjectDescriptorBuilder $builder
  
  @return void
docstring_tokens: Parses the file identified by the given filename and passes the resulting FileDescriptor to the ProjectBuilder .