protected function processLastLogicalOperatorNode()
    {
        if (null !== $this->scope->getCurrentLeftNode()) {
            $this->addError('Logical operator must be followed by a valid operation.', self::ERROR_CODE_LOGICAL_OPERATOR_FOLLOWED);
        } elseif (null !== $this->scope->getLastOrNode()) {
            $node = new BooleanNode($this->scope->getLastOrNode(), $this->scope->getNode(), self::LOGICAL_OR);
            $this->scope->setNode($node);
        }

        return $this;
    }