PDepend\Source\Language\PHP\AbstractPHPParser::parseCommentWithOptionalInlineClassOrInterfaceReference PHP Method

parseCommentWithOptionalInlineClassOrInterfaceReference() private method

Parses a comment and optionally an embedded class or interface type annotation.
Since: 0.9.8
private parseCommentWithOptionalInlineClassOrInterfaceReference ( ) : PDepend\Source\AST\ASTComment
return PDepend\Source\AST\ASTComment
    private function parseCommentWithOptionalInlineClassOrInterfaceReference()
    {
        $token = $this->consumeToken(Tokens::T_COMMENT);
        $comment = $this->builder->buildAstComment($token->image);
        if (preg_match(self::REGEXP_INLINE_TYPE, $token->image, $match)) {
            $comment->addChild($this->builder->buildAstClassOrInterfaceReference($match[1]));
        }
        $comment->configureLinesAndColumns($token->startLine, $token->endLine, $token->startColumn, $token->endColumn);
        return $comment;
    }
AbstractPHPParser