From a4565e88edbc8e3bd092a475469769c86a4c350c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 2 Aug 2013 22:40:51 +0200 Subject: add Twig & refactor poche --- inc/Twig/Extensions/Grammar/Switch.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 inc/Twig/Extensions/Grammar/Switch.php (limited to 'inc/Twig/Extensions/Grammar/Switch.php') diff --git a/inc/Twig/Extensions/Grammar/Switch.php b/inc/Twig/Extensions/Grammar/Switch.php new file mode 100644 index 00000000..4245f2c8 --- /dev/null +++ b/inc/Twig/Extensions/Grammar/Switch.php @@ -0,0 +1,24 @@ +', $this->name); + } + + public function parse(Twig_Token $token) + { + $this->parser->getStream()->expect(Twig_Token::NAME_TYPE, $this->name); + + return new Twig_Node_Expression_Constant(true, $token->getLine()); + } +} -- cgit v1.2.3