mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-09 05:15:35 +00:00
fix parsing of postfix expressions
This commit is contained in:
committed by
Fabien Potencier
parent
13f80898a2
commit
7284fa9829
@@ -69,13 +69,13 @@ class Twig_ExpressionParser
|
||||
$expr = $this->parseExpression($operator['precedence']);
|
||||
$class = $operator['class'];
|
||||
|
||||
return new $class($expr, $token->getLine());
|
||||
return $this->parsePostfixExpression(new $class($expr, $token->getLine()));
|
||||
} elseif ($token->test(Twig_Token::PUNCTUATION_TYPE, '(')) {
|
||||
$this->parser->getStream()->next();
|
||||
$expr = $this->parseExpression();
|
||||
$this->parser->getStream()->expect(Twig_Token::PUNCTUATION_TYPE, ')');
|
||||
|
||||
return $expr;
|
||||
return $this->parsePostfixExpression($expr);
|
||||
}
|
||||
|
||||
return $this->parsePrimaryExpression();
|
||||
|
||||
Reference in New Issue
Block a user