From 1b136555d279bf2cfb28f5661225c010426754f5 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Wed, 5 Oct 2011 15:22:53 +1100 Subject: transition to Twig --- inc/contrib/Twig/Node/Expression/Unary.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 inc/contrib/Twig/Node/Expression/Unary.php (limited to 'inc/contrib/Twig/Node/Expression/Unary.php') diff --git a/inc/contrib/Twig/Node/Expression/Unary.php b/inc/contrib/Twig/Node/Expression/Unary.php new file mode 100644 index 00000000..c514388e --- /dev/null +++ b/inc/contrib/Twig/Node/Expression/Unary.php @@ -0,0 +1,30 @@ + $node), array(), $lineno); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler->raw('('); + $this->operator($compiler); + $compiler + ->subcompile($this->getNode('node')) + ->raw(')') + ; + } + + abstract public function operator(Twig_Compiler $compiler); +} -- cgit v1.3