public function parseAssignmentExpression() {
$targets = array();
while (true) {
$token = $this->parser
->getStream()
->expect(Twig_Token::NAME_TYPE, null, 'Only variables can be assigned to');
if (in_array($token
->getValue(), array(
'true',
'false',
'none',
))) {
throw new Twig_Error_Syntax(sprintf('You cannot assign a value to "%s"', $token
->getValue()), $token
->getLine(), $this->parser
->getFilename());
}
$targets[] = new Twig_Node_Expression_AssignName($token
->getValue(), $token
->getLine());
if (!$this->parser
->getStream()
->test(Twig_Token::PUNCTUATION_TYPE, ',')) {
break;
}
$this->parser
->getStream()
->next();
}
return new Twig_Node($targets);
}