diff --git a/src/TwigHooks/src/Twig/Node/HookNode.php b/src/TwigHooks/src/Twig/Node/HookNode.php index 1d1dd1ce..2b84bed7 100644 --- a/src/TwigHooks/src/Twig/Node/HookNode.php +++ b/src/TwigHooks/src/Twig/Node/HookNode.php @@ -14,6 +14,7 @@ final class HookNode extends Node public function __construct ( Node $hookNames, ?Node $parameters, + int $lineno, string $tag = null ) { diff --git a/src/TwigHooks/src/Twig/TokenParser/HookTokenParser.php b/src/TwigHooks/src/Twig/TokenParser/HookTokenParser.php index 194c7fcc..f0020365 100644 --- a/src/TwigHooks/src/Twig/TokenParser/HookTokenParser.php +++ b/src/TwigHooks/src/Twig/TokenParser/HookTokenParser.php @@ -24,6 +24,11 @@ public function parse(Token $token): Node $variables = $this->parser->getExpressionParser()->parseMultitargetExpression(); } + $disablePassthrough = false; + if ($stream->nextIf(Token::NAME_TYPE, 'disablePassthrough')) { + $disablePassthrough = true; + } + $stream->expect(Token::BLOCK_END_TYPE); return new HookNode($hookNames, $variables, $lineno, $this->getTag());