From f14e0a37ca4ae1e92d854a15808895d4ca9a9de0 Mon Sep 17 00:00:00 2001 From: nikic <+@ni-po.com> Date: Mon, 20 Dec 2010 18:27:01 +0100 Subject: [PATCH] use the passed $token in isUnary and isBinary of ExpressionParser --- lib/Twig/ExpressionParser.php | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Twig/ExpressionParser.php b/lib/Twig/ExpressionParser.php index 5f6b06c..f6c4a8c 100644 --- a/lib/Twig/ExpressionParser.php +++ b/lib/Twig/ExpressionParser.php @@ -101,12 +101,12 @@ class Twig_ExpressionParser protected function isUnary(Twig_Token $token) { - return $this->parser->getStream()->test(Twig_Token::OPERATOR_TYPE) && isset($this->unaryOperators[$token->getValue()]); + return $token->test(Twig_Token::OPERATOR_TYPE) && isset($this->unaryOperators[$token->getValue()]); } protected function isBinary(Twig_Token $token) { - return $this->parser->getStream()->test(Twig_Token::OPERATOR_TYPE) && isset($this->binaryOperators[$token->getValue()]); + return $token->test(Twig_Token::OPERATOR_TYPE) && isset($this->binaryOperators[$token->getValue()]); } public function parsePrimaryExpression($assignment = false) -- 1.7.2.5