public function leaveNode(Node $node) { if ($node instanceof Node\FunctionLike) { $this->loopStacks->pop(); } elseif ($this->isTargetLoopNode($node)) { $this->getCurrentLoopStack()->pop(); } }