PDepend\Source\Language\PHP\AbstractPHPParser::consumeComments PHP Метод

consumeComments() защищенный Метод

This method will consume all comment tokens from the token stream.
protected consumeComments ( ) : void
Результат void
    protected function consumeComments()
    {
        $type = $this->tokenizer->peek();
        while ($type == Tokens::T_COMMENT || $type == Tokens::T_DOC_COMMENT) {
            $token = $this->consumeToken($type);
            $type = $this->tokenizer->peek();
            if (Tokens::T_COMMENT === $token->type) {
                continue;
            }
            $this->docComment = $token->image;
            if (preg_match('(\\s+@package\\s+[^\\s]+\\s+)', $token->image)) {
                $this->packageName = $this->parsePackageAnnotation($token->image);
            }
        }
    }
AbstractPHPParser