public function enterExpression(Expression $expr)
    {
        $hash = spl_object_hash($expr);

        if ($expr instanceof Key) {
            if (!count($this->hashes)) {
                $this->qb->andWhere($this->toExpr($expr));
            } else {
                $lastHash = end($this->hashes);

                $this->map[$lastHash][] = $this->toExpr($expr);
            }
        } elseif ($expr instanceof OrX) {
            $this->hashes[] = $hash;
            $this->map[$hash] = [];
        } elseif ($expr instanceof AndX) {
            $this->hashes[] = $hash;
            $this->map[$hash] = [];
        }

        return $expr;
    }