public function parseArguments() {
$args = array();
$stream = $this->parser
->getStream();
$stream
->expect(Twig_Token::PUNCTUATION_TYPE, '(', 'A list of arguments must be opened by a parenthesis');
while (!$stream
->test(Twig_Token::PUNCTUATION_TYPE, ')')) {
if (!empty($args)) {
$stream
->expect(Twig_Token::PUNCTUATION_TYPE, ',', 'Arguments must be separated by a comma');
}
$args[] = $this
->parseExpression();
}
$stream
->expect(Twig_Token::PUNCTUATION_TYPE, ')', 'A list of arguments must be closed by a parenthesis');
return new Twig_Node($args);
}