示例#1
0
 /**
  * Parses a trait use statement.
  *
  * @return PHP_Depend_Code_ASTTraitUseStatement
  * @since 1.0.0
  */
 private function parseTraitUseStatement()
 {
     $this->tokenStack->push();
     $this->consumeToken(self::T_USE);
     $useStatement = $this->builder->buildAstTraitUseStatement();
     $useStatement->addChild($this->parseTraitReference());
     $this->consumeComments();
     while (self::T_COMMA === $this->tokenizer->peek()) {
         $this->consumeToken(self::T_COMMA);
         $useStatement->addChild($this->parseTraitReference());
     }
     return $this->setNodePositionsAndReturn($this->parseOptionalTraitAdaptation($useStatement));
 }