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.
11 class Twig_Extensions_Grammar_Constant
extends Twig_Extensions_Grammar
15 public function __construct($name, $type = null)
18 $this->type
= null === $type ? Twig_Token
::NAME_TYPE
: $type;
21 public function __toString()
26 public function parse(Twig_Token
$token)
28 $this->parser
->getStream()->expect($this->type
, $this->name
);
33 public function getType()