private function addExpression($part, $type, $expression)
    {
        if (!($expression instanceof Expression\Expression)) {
            $expression = new Expression\Expression($type, (array) $expression);
        }

        if ($this->parts[$part] === null) {
            $this->parts[$part] = $expression;

            return $this;
        }

        if ($this->parts[$part]->getType() !== $type) {
            $this->parts[$part] = new Expression\Expression($type, array($this->parts[$part]));
        }

        foreach ($expression->getParts() as $expressionPart) {
            $this->parts[$part]->addPart($expressionPart);
        }

        return $this;
    }