4 * This file is part of Twig.
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 public function setParser(Twig_Parser $parser);
25 * Parses a token and returns a node.
27 * @return Twig_NodeInterface
29 * @throws Twig_Error_Syntax
31 public function parse(Twig_Token $token);
34 * Gets the tag name associated with this token parser.
36 * @return string The tag name
38 public function getTag();