protected function addKeyValues(\Twig_TokenStream $stream, \Twig_Node_Expression_Array $values)
    {
        if (!$stream->test(\Twig_Token::NAME_TYPE)
            && !$stream->test(\Twig_Token::STRING_TYPE)) {
            throw new \Twig_Error_Syntax(sprintf('The attribute name "%s" must be an STRING or CONSTANT', $stream->getCurrent()->getValue()), $stream->getCurrent()->getLine(), $stream->getSourceContext()->getName());
        }

        $attr = $stream->getCurrent();
        $attr = new \Twig_Node_Expression_Constant($attr->getValue(), $attr->getLine());
        $stream->next();

        if (!$stream->test(\Twig_Token::OPERATOR_TYPE, '=')) {
            throw new \Twig_Error_Syntax("The attribute must be followed by '=' operator", $stream->getCurrent()->getLine(), $stream->getSourceContext()->getName());
        }

        $stream->next();
        $values->addElement($this->parser->getExpressionParser()->parseExpression(), $attr);
    }