From: nikic <+@ni-po.com> Date: Mon, 20 Dec 2010 17:31:31 +0000 (+0100) Subject: remove "(,)" hint from syntax error messages (the expect function will do that already) X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=59f45ba11d2140ab62868e4064c15702b86b802e;p=web%2Fkonrad%2Ftwig.git remove "(,)" hint from syntax error messages (the expect function will do that already) --- diff --git a/lib/Twig/ExpressionParser.php b/lib/Twig/ExpressionParser.php index f6c4a8c..2c7d8a3 100644 --- a/lib/Twig/ExpressionParser.php +++ b/lib/Twig/ExpressionParser.php @@ -164,7 +164,7 @@ class Twig_ExpressionParser $elements = array(); while (!$stream->test(Twig_Token::PUNCTUATION_TYPE, ']')) { if (!empty($elements)) { - $stream->expect(Twig_Token::PUNCTUATION_TYPE, ',', 'An array element must be followed by a comma (,)'); + $stream->expect(Twig_Token::PUNCTUATION_TYPE, ',', 'An array element must be followed by a comma'); // trailing ,? if ($stream->test(Twig_Token::PUNCTUATION_TYPE, ']')) { @@ -186,7 +186,7 @@ class Twig_ExpressionParser $elements = array(); while (!$stream->test(Twig_Token::PUNCTUATION_TYPE, '}')) { if (!empty($elements)) { - $stream->expect(Twig_Token::PUNCTUATION_TYPE, ',', 'A hash value must be followed by a comma (,)'); + $stream->expect(Twig_Token::PUNCTUATION_TYPE, ',', 'A hash value must be followed by a comma'); // trailing ,? if ($stream->test(Twig_Token::PUNCTUATION_TYPE, '}')) { @@ -306,7 +306,7 @@ class Twig_ExpressionParser $args = array(); while (!$parser->test(Twig_Token::PUNCTUATION_TYPE, ')')) { if (!empty($args)) { - $parser->expect(Twig_Token::PUNCTUATION_TYPE, ',', 'Arguments must be separated by a comma (,)'); + $parser->expect(Twig_Token::PUNCTUATION_TYPE, ',', 'Arguments must be separated by a comma'); } $args[] = $this->parseExpression(); }