36        $stream = $this->parser->getStream();
 
   37        $names = $this->parser->getExpressionParser()->parseAssignmentExpression();
 
   41            $values = $this->parser->getExpressionParser()->parseMultitargetExpression();
 
   45            if (count(
$names) !== count($values)) {
 
   46                throw new Twig_Error_Syntax(
'When using set, you must have the same number of variables and assignments.', 
$stream->getCurrent()->getLine(), 
$stream->getSourceContext());
 
   52                throw new Twig_Error_Syntax(
'When using set with a block, you cannot have a multi-target.', 
$stream->getCurrent()->getLine(), 
$stream->getSourceContext());
 
   57            $values = $this->parser->subparse(array($this, 
'decideBlockEnd'), 
true);
 
   66        return $token->
test(
'endset');
 
   75class_alias(
'Twig_TokenParser_Set', 
'Twig\TokenParser\SetTokenParser', 
false);
 
An exception for terminatinating execution or to throw for unit testing.
Exception thrown when a syntax error occurs during lexing or parsing of a template.
decideBlockEnd(Twig_Token $token)
getTag()
Gets the tag name associated with this token parser.
parse(Twig_Token $token)
Parses a token and returns a node.
Base class for all token parsers.
test($type, $values=null)
Tests the current token for a type and/or a value.
$stream
PHP stream implementation.