4 * This file is part of Twig.
6 * (c) 2010 Fabien Potencier
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
13 * Interface implemented by token parsers.
15 * @author Fabien Potencier <fabien@symfony.com>
17 interface Twig_TokenParserInterface
20 * Sets the parser associated with this token parser
22 * @param $parser A Twig_Parser instance
24 public function setParser(Twig_Parser
$parser);
27 * Parses a token and returns a node.
29 * @param Twig_Token $token A Twig_Token instance
31 * @return Twig_NodeInterface A Twig_NodeInterface instance
33 public function parse(Twig_Token
$token);
36 * Gets the tag name associated with this token parser.
38 * @return string The tag name
40 public function getTag();