private function arrayPair() {
    if ($this->currentType === '&') {
      return $this->writeVariable();
    }
    $node = $this->expr();
    if ($this->currentType === T_DOUBLE_ARROW) {
      $expr = $node;
      $node = new ArrayPairNode();
      $node->addChild($expr, 'key');
      $this->mustMatch(T_DOUBLE_ARROW, $node);
      if ($this->currentType === '&') {
        $node->addChild($this->writeVariable(), 'value');
      }
      else {
        $node->addChild($this->expr(), 'value');
      }
    }
    return $node;
  }
private function arrayPair() {
    if ($this->currentType === '&') {
      return $this->writeVariable();
    }
    $node = $this->expr();
    if ($this->currentType === T_DOUBLE_ARROW) {
      $expr = $node;
      $node = new ArrayPairNode();
      $node->addChild($expr, 'key');
      $this->mustMatch(T_DOUBLE_ARROW, $node);
      if ($this->currentType === '&') {
        $node->addChild($this->writeVariable(), 'value');
      }
      else {
        $node->addChild($this->expr(), 'value');
      }
    }
    return $node;
  }
private function arrayPair ( ) { if ( $ this -> currentType === '&' ) { return $ this -> writeVariable ( ) ; } $ node = $ this -> expr ( ) ; if ( $ this -> currentType === T_DOUBLE_ARROW ) { $ expr = $ node ; $ node = new ArrayPairNode ( ) ; $ node -> addChild ( $ expr , 'key' ) ; $ this -> mustMatch ( T_DOUBLE_ARROW , $ node ) ; if ( $ this -> currentType === '&' ) { $ node -> addChild ( $ this -> writeVariable ( ) , 'value' ) ; } else { $ node -> addChild ( $ this -> expr ( ) , 'value' ) ; } } return $ node ; }
Parse an array pair.
@return Node
Parse an array pair .