Esempio n. 1
0
 /**
  * This method parses a {@link \PDepend\Source\AST\ASTStaticReference} node.
  *
  * @param  \PDepend\Source\Tokenizer\Token $token The "static" keyword token.
  * @return \PDepend\Source\AST\ASTStaticReference
  * @throws \PDepend\Source\Parser\ParserException
  * @throws \PDepend\Source\Parser\InvalidStateException
  * @since  0.9.6
  */
 private function parseStaticReference(Token $token)
 {
     // Strip optional comments
     $this->consumeComments();
     if ($this->classOrInterface === null) {
         throw new InvalidStateException($token->startLine, (string) $this->compilationUnit, 'The keyword "static" was used outside of a class/method scope.');
     }
     $ref = $this->builder->buildAstStaticReference($this->classOrInterface);
     $ref->configureLinesAndColumns($token->startLine, $token->endLine, $token->startColumn, $token->endColumn);
     return $ref;
 }