From 874b8cbf002e9d8bf0ff39671e1501165016320a Mon Sep 17 00:00:00 2001 From: Michael Save Date: Mon, 9 Apr 2012 20:52:26 +1000 Subject: inc/contrib -> inc/lib --- inc/contrib/Twig/TokenParser/Extends.php | 54 -------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 inc/contrib/Twig/TokenParser/Extends.php (limited to 'inc/contrib/Twig/TokenParser/Extends.php') diff --git a/inc/contrib/Twig/TokenParser/Extends.php b/inc/contrib/Twig/TokenParser/Extends.php deleted file mode 100644 index 67eacda0..00000000 --- a/inc/contrib/Twig/TokenParser/Extends.php +++ /dev/null @@ -1,54 +0,0 @@ - - * {% extends "base.html" %} - * - */ -class Twig_TokenParser_Extends extends Twig_TokenParser -{ - /** - * Parses a token and returns a node. - * - * @param Twig_Token $token A Twig_Token instance - * - * @return Twig_NodeInterface A Twig_NodeInterface instance - */ - public function parse(Twig_Token $token) - { - if (!$this->parser->isMainScope()) { - throw new Twig_Error_Syntax('Cannot extend from a block', $token->getLine()); - } - - if (null !== $this->parser->getParent()) { - throw new Twig_Error_Syntax('Multiple extends tags are forbidden', $token->getLine()); - } - $this->parser->setParent($this->parser->getExpressionParser()->parseExpression()); - - $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE); - - return null; - } - - /** - * Gets the tag name associated with this token parser. - * - * @param string The tag name - */ - public function getTag() - { - return 'extends'; - } -} -- cgit v1.3