private function dynamicClassNameReference(Node $object) {
    $node = $object;
    while ($this->currentType === T_OBJECT_OPERATOR) {
      $node = new ObjectPropertyNode();
      $node->addChild($object, 'object');
      $this->mustMatch(T_OBJECT_OPERATOR, $node);
      $node->addChild($this->objectProperty(), 'property');
      $object = $this->offsetVariable($node);
    }
    return $node;
  }