From 4ebbc5e43e446d8f48b03dff2e1c1357dce43acd Mon Sep 17 00:00:00 2001 From: nikic <+@ni-po.com> Date: Wed, 22 Dec 2010 17:33:28 +0100 Subject: [PATCH] rename $parser to $stream in parseArguments --- lib/Twig/ExpressionParser.php | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Twig/ExpressionParser.php b/lib/Twig/ExpressionParser.php index bba2ae3..68f9a9d 100644 --- a/lib/Twig/ExpressionParser.php +++ b/lib/Twig/ExpressionParser.php @@ -296,17 +296,17 @@ class Twig_ExpressionParser public function parseArguments() { - $parser = $this->parser->getStream(); - $parser->expect(Twig_Token::PUNCTUATION_TYPE, '('); - $args = array(); - while (!$parser->test(Twig_Token::PUNCTUATION_TYPE, ')')) { + $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)) { - $parser->expect(Twig_Token::PUNCTUATION_TYPE, ',', 'Arguments must be separated by a comma'); + $stream->expect(Twig_Token::PUNCTUATION_TYPE, ',', 'Arguments must be separated by a comma'); } $args[] = $this->parseExpression(); } - $parser->expect(Twig_Token::PUNCTUATION_TYPE, ')', 'A list of arguments must be closed by a parenthesis'); + $stream->expect(Twig_Token::PUNCTUATION_TYPE, ')', 'A list of arguments must be closed by a parenthesis'); return new Twig_Node($args); } -- 1.7.2.5