private function traitUse() {
    $node = new TraitUseNode();
    $this->mustMatch(T_USE, $node);
    // trait_list
    $traits = new CommaListNode();
    do {
      $traits->addChild($this->name());
    } while ($this->tryMatch(',', $traits));
    $node->addChild($traits, 'traits');
    // trait_adaptations
    if ($this->tryMatch('{', $node)) {
      $adaptations = new StatementBlockNode();
      while ($this->currentType !== NULL && $this->currentType !== '}') {
        $adaptations->addChild($this->traitAdaptation());
        $this->matchHidden($adaptations);
      }
      $node->addChild($adaptations, 'adaptations');
      $this->mustMatch('}', $node, NULL, TRUE, TRUE);
      return $node;
    }
    $this->endStatement($node);
    return $node;
  }
private function traitUse() {
    $node = new TraitUseNode();
    $this->mustMatch(T_USE, $node);
    // trait_list
    $traits = new CommaListNode();
    do {
      $traits->addChild($this->name());
    } while ($this->tryMatch(',', $traits));
    $node->addChild($traits, 'traits');
    // trait_adaptations
    if ($this->tryMatch('{', $node)) {
      $adaptations = new StatementBlockNode();
      while ($this->currentType !== NULL && $this->currentType !== '}') {
        $adaptations->addChild($this->traitAdaptation());
        $this->matchHidden($adaptations);
      }
      $node->addChild($adaptations, 'adaptations');
      $this->mustMatch('}', $node, NULL, TRUE, TRUE);
      return $node;
    }
    $this->endStatement($node);
    return $node;
  }
private function traitUse ( ) { $ node = new TraitUseNode ( ) ; $ this -> mustMatch ( T_USE , $ node ) ; // trait_list $ traits = new CommaListNode ( ) ; do { $ traits -> addChild ( $ this -> name ( ) ) ; } while ( $ this -> tryMatch ( ',' , $ traits ) ) ; $ node -> addChild ( $ traits , 'traits' ) ; // trait_adaptations if ( $ this -> tryMatch ( '{' , $ node ) ) { $ adaptations = new StatementBlockNode ( ) ; while ( $ this -> currentType !== NULL && $ this -> currentType !== '}' ) { $ adaptations -> addChild ( $ this -> traitAdaptation ( ) ) ; $ this -> matchHidden ( $ adaptations ) ; } $ node -> addChild ( $ adaptations , 'adaptations' ) ; $ this -> mustMatch ( '}' , $ node , NULL , TRUE , TRUE ) ; return $ node ; } $ this -> endStatement ( $ node ) ; return $ node ; }
Parse a trait use statement.
@return TraitUseNode
Parse a trait use statement .