You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Hash.php 506B

12345678910111213141516171819202122
  1. <?php
  2. /*
  3. * This file is part of Twig.
  4. *
  5. * (c) 2010 Fabien Potencier
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. class Twig_Extensions_Grammar_Hash extends Twig_Extensions_Grammar
  11. {
  12. public function __toString()
  13. {
  14. return sprintf('<%s:hash>', $this->name);
  15. }
  16. public function parse(Twig_Token $token)
  17. {
  18. return $this->parser->getExpressionParser()->parseHashExpression();
  19. }
  20. }