mirror of
https://github.com/twigphp/Twig.git
synced 2026-11-01 00:25:57 +00:00
Merge branch '3.x' into 4.x
* 3.x: Fix CS
This commit is contained in:
@@ -814,10 +814,8 @@ class ExpressionParser
|
||||
$token = $stream->next();
|
||||
if (
|
||||
Token::NAME_TYPE == $token->getType()
|
||||
||
|
||||
Token::NUMBER_TYPE == $token->getType()
|
||||
||
|
||||
(Token::OPERATOR_TYPE == $token->getType() && preg_match(Lexer::REGEX_NAME, $token->getValue()))
|
||||
|| Token::NUMBER_TYPE == $token->getType()
|
||||
|| (Token::OPERATOR_TYPE == $token->getType() && preg_match(Lexer::REGEX_NAME, $token->getValue()))
|
||||
) {
|
||||
$attribute = new ConstantExpression($token->getValue(), $token->getLine());
|
||||
} else {
|
||||
@@ -835,8 +833,7 @@ class ExpressionParser
|
||||
&&
|
||||
(
|
||||
null !== $this->parser->getImportedSymbol('template', $node->getAttribute('name'))
|
||||
||
|
||||
'_self' === $node->getAttribute('name') && $attribute instanceof ConstantExpression
|
||||
|| '_self' === $node->getAttribute('name') && $attribute instanceof ConstantExpression
|
||||
)
|
||||
) {
|
||||
return new MacroReferenceExpression(new TemplateVariable($node->getAttribute('name'), $node->getTemplateLine()), 'macro_'.$attribute->getAttribute('value'), $arguments, $node->getTemplateLine());
|
||||
|
||||
Reference in New Issue
Block a user