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

parseConstantOrParentMemberPrimaryPrefix() private method

This method parses a {@link \PDepend\Source\AST\ASTConstant} node or an instance of {@link \PDepend\Source\AST\ASTParentReference} as part of a {@link \PDepend\Source\AST\ASTMemberPrimaryPrefix} that contains the parent reference as its first child when the self token is followed by a double colon token.
Since: 0.9.6
private parseConstantOrParentMemberPrimaryPrefix ( ) : PDepend\Source\AST\ASTNode
return PDepend\Source\AST\ASTNode
    private function parseConstantOrParentMemberPrimaryPrefix()
    {
        // Consume parent token and strip optional comments
        $token = $this->consumeToken(Tokens::T_PARENT);
        $this->consumeComments();
        if ($this->tokenizer->peek() == Tokens::T_DOUBLE_COLON) {
            return $this->parseStaticMemberPrimaryPrefix($this->parseParentReference($token));
        }
        return $this->builder->buildAstConstant($token->image);
    }
AbstractPHPParser