public function invoke(DocumentationInterface $parent, string $documentation): void
    {
        try {
            $this->tokenConsumer->initialize();

            $this->annotationLexer->setInput($documentation);
            $this->annotationLexer->moveNext();
            $this->annotationLexer->moveNext();

            while ($this->annotationLexer->token) {
                $this->parse(
                    $this->annotationLexer->token['type'],
                    $this->annotationLexer->token['value']
                );
                $this->annotationLexer->moveNext();
                $this->annotationLexer->moveNext();
            }

            $this->tokenConsumer->finalize();

            $this->annotationRegister->invoke($parent, $this->tokenConsumer->getParsedAnnotations());
        } catch (AnnotationParseException $exception) {
            throw new AnnotationParseException($exception->getMessage());
        }
    }
public function invoke(DocumentationInterface $parent, string $documentation): void
    {
        try {
            $this->tokenConsumer->initialize();

            $this->annotationLexer->setInput($documentation);
            $this->annotationLexer->moveNext();
            $this->annotationLexer->moveNext();

            while ($this->annotationLexer->token) {
                $this->parse(
                    $this->annotationLexer->token['type'],
                    $this->annotationLexer->token['value']
                );
                $this->annotationLexer->moveNext();
                $this->annotationLexer->moveNext();
            }

            $this->tokenConsumer->finalize();

            $this->annotationRegister->invoke($parent, $this->tokenConsumer->getParsedAnnotations());
        } catch (AnnotationParseException $exception) {
            throw new AnnotationParseException($exception->getMessage());
        }
    }
public function invoke ( DocumentationInterface $ parent , string $ documentation ) : void { try { $ this -> tokenConsumer -> initialize ( ) ; $ this -> annotationLexer -> setInput ( $ documentation ) ; $ this -> annotationLexer -> moveNext ( ) ; $ this -> annotationLexer -> moveNext ( ) ; while ( $ this -> annotationLexer -> token ) { $ this -> parse ( $ this -> annotationLexer -> token [ 'type' ] , $ this -> annotationLexer -> token [ 'value' ] ) ; $ this -> annotationLexer -> moveNext ( ) ; $ this -> annotationLexer -> moveNext ( ) ; } $ this -> tokenConsumer -> finalize ( ) ; $ this -> annotationRegister -> invoke ( $ parent , $ this -> tokenConsumer -> getParsedAnnotations ( ) ) ; } catch ( AnnotationParseException $ exception ) { throw new AnnotationParseException ( $ exception -> getMessage ( ) ) ; } }
Parse a documentation to add annotations to parent.

@param DocumentationInterface $parent        The parent that has this documentation.
@param string                 $documentation The documentation string to parse.

@throws AnnotationParseException If there is an error during parsing process.
Parse a documentation to add annotations to parent .