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

parseConstantOrSelfMemberPrimaryPrefix() private method

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