mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-05 06:56:51 +00:00
fixed Parser contract for some implementations
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
namespace Twig\TokenParser;
|
||||
|
||||
use Twig\Error\SyntaxError;
|
||||
use Twig\Node\Node;
|
||||
use Twig\Token;
|
||||
|
||||
/**
|
||||
@@ -38,6 +39,8 @@ class ExtendsTokenParser extends AbstractTokenParser
|
||||
$this->parser->setParent($this->parser->getExpressionParser()->parseExpression());
|
||||
|
||||
$stream->expect(Token::BLOCK_END_TYPE);
|
||||
|
||||
return new Node();
|
||||
}
|
||||
|
||||
public function getTag()
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace Twig\TokenParser;
|
||||
use Twig\Error\SyntaxError;
|
||||
use Twig\Node\BodyNode;
|
||||
use Twig\Node\MacroNode;
|
||||
use Twig\Node\Node;
|
||||
use Twig\Token;
|
||||
|
||||
/**
|
||||
@@ -49,6 +50,8 @@ class MacroTokenParser extends AbstractTokenParser
|
||||
$stream->expect(Token::BLOCK_END_TYPE);
|
||||
|
||||
$this->parser->setMacro($name, new MacroNode($name, new BodyNode([$body]), $arguments, $lineno, $this->getTag()));
|
||||
|
||||
return new Node();
|
||||
}
|
||||
|
||||
public function decideBlockEnd(Token $token)
|
||||
|
||||
Reference in New Issue
Block a user