Exemplo n.º 1
0
 public function acceptVisitor(VisitorInterface $visitor)
 {
     $visitor->visit($this);
     $child = $this->head;
     while ($child) {
         if ($child instanceof ParentNode) {
             $child->acceptVisitor($visitor);
         } else {
             $visitor->visit($child);
         }
         $child = $child->next;
     }
     $visitor->visitEnd($this);
 }
Exemplo n.º 2
0
 public function accept(VisitorInterface $v)
 {
     $v->visit($this);
 }