Beispiel #1
0
 /**
  * This method parses a method- or constant-postfix expression. This expression
  * will contain an identifier node as nested child.
  *
  * @return \PDepend\Source\AST\ASTNode
  * @throws \PDepend\Source\Parser\ParserException
  * @since  0.9.6
  */
 private function parseMethodOrConstantPostfix()
 {
     $this->tokenStack->push();
     $node = $this->parseIdentifier();
     $this->consumeComments();
     if ($this->tokenizer->peek() === Tokens::T_PARENTHESIS_OPEN) {
         $postfix = $this->parseMethodPostfix($node);
     } else {
         $postfix = $this->builder->buildAstConstantPostfix($node->getImage());
         $postfix->addChild($node);
     }
     return $this->setNodePositionsAndReturn($postfix);
 }