public function leaveNode(Node $node) { if (!$this->expressionStack->isEmpty() && $node === $this->expressionStack->top()) { $this->expressionStack->pop(); } }