Esempio n. 1
0
 /**
  * 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.
  *
  * @return \PDepend\Source\AST\ASTNode
  * @throws \PDepend\Source\Parser\ParserException
  * @throws \PDepend\Source\Parser\InvalidStateException
  * @since  0.9.6
  */
 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);
 }