ParserInterface.php 593B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /*
  3. * This file is part of Twig.
  4. *
  5. * (c) 2009 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. /**
  11. * Interface implemented by parser classes.
  12. *
  13. * @package twig
  14. * @author Fabien Potencier <fabien@symfony.com>
  15. */
  16. interface Twig_ParserInterface
  17. {
  18. /**
  19. * Converts a token stream to a node tree.
  20. *
  21. * @param Twig_TokenStream $stream A token stream instance
  22. *
  23. * @return Twig_Node_Module A node tree
  24. */
  25. function parse(Twig_TokenStream $code);
  26. }