/** * This method parses a method- or constant-postfix expression. This expression * will contain an identifier node as nested child. * * @return PHP_Depend_Code_ASTNode * @throws PHP_Depend_Parser_Exception When an error occured during the * parsing process. * @since 0.9.6 */ private function parseMethodOrConstantPostfix() { $this->tokenStack->push(); $node = $this->parseIdentifier(); $this->consumeComments(); if ($this->tokenizer->peek() === self::T_PARENTHESIS_OPEN) { $postfix = $this->parseMethodPostfix($node); } else { $postfix = $this->builder->buildAstConstantPostfix($node->getImage()); $postfix->addChild($node); } return $this->setNodePositionsAndReturn($postfix); }