mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-23 12:15:17 +00:00
Merge branch '3.x' into 4.x
* 3.x: Add an additional example in the docs Fix ignored parenthesis in expressions Tweak previous merge Added details in the doc of filters and functions of IntlExtension Add more information about the filter and the negative operators Update plural.rst: Fixing filter name
This commit is contained in:
@@ -167,7 +167,12 @@ class ExpressionParser
|
||||
$expr = $this->parseExpression();
|
||||
$this->parser->getStream()->expect(Token::PUNCTUATION_TYPE, ')', 'An opened parenthesis is not properly closed');
|
||||
|
||||
return $this->parsePostfixExpression($expr);
|
||||
$expr = $this->parsePostfixExpression($expr);
|
||||
if ($expr instanceof NegUnary) {
|
||||
$expr->wrapInParentheses();
|
||||
}
|
||||
|
||||
return $expr;
|
||||
}
|
||||
|
||||
return $this->parsePrimaryExpression();
|
||||
|
||||
Reference in New Issue
Block a user