From 266334042e0b9b8afa5be2e71e49976df4ba28d6 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 3 Jan 2011 12:28:11 +0100 Subject: [PATCH] removed the grammar and simple token parser code (moved to the Twig Extensions repository) --- CHANGELOG | 1 + lib/Twig/Grammar.php | 30 ------ lib/Twig/Grammar/Arguments.php | 22 ----- lib/Twig/Grammar/Array.php | 22 ----- lib/Twig/Grammar/Body.php | 39 -------- lib/Twig/Grammar/Boolean.php | 24 ----- lib/Twig/Grammar/Constant.php | 37 -------- lib/Twig/Grammar/Expression.php | 22 ----- lib/Twig/Grammar/Hash.php | 22 ----- lib/Twig/Grammar/Number.php | 24 ----- lib/Twig/Grammar/Optional.php | 69 --------------- lib/Twig/Grammar/Switch.php | 24 ----- lib/Twig/Grammar/Tag.php | 56 ------------ lib/Twig/GrammarInterface.php | 18 ---- lib/Twig/SimpleTokenParser.php | 132 ---------------------------- test/Twig/Tests/Grammar/ArgumentsTest.php | 19 ---- test/Twig/Tests/Grammar/ArrayTest.php | 19 ---- test/Twig/Tests/Grammar/BodyTest.php | 19 ---- test/Twig/Tests/Grammar/BooleanTest.php | 19 ---- test/Twig/Tests/Grammar/ConstantTest.php | 19 ---- test/Twig/Tests/Grammar/ExpressionTest.php | 19 ---- test/Twig/Tests/Grammar/NumberTest.php | 19 ---- test/Twig/Tests/Grammar/OptionalTest.php | 19 ---- test/Twig/Tests/Grammar/TagTest.php | 23 ----- test/Twig/Tests/SimpleTokenParser.php | 48 ---------- test/Twig/Tests/SimpleTokenParserTest.php | 112 ----------------------- test/Twig/Tests/grammarTest.php | 63 ------------- 27 files changed, 1 insertions(+), 939 deletions(-) delete mode 100644 lib/Twig/Grammar.php delete mode 100644 lib/Twig/Grammar/Arguments.php delete mode 100644 lib/Twig/Grammar/Array.php delete mode 100644 lib/Twig/Grammar/Body.php delete mode 100644 lib/Twig/Grammar/Boolean.php delete mode 100644 lib/Twig/Grammar/Constant.php delete mode 100644 lib/Twig/Grammar/Expression.php delete mode 100644 lib/Twig/Grammar/Hash.php delete mode 100644 lib/Twig/Grammar/Number.php delete mode 100644 lib/Twig/Grammar/Optional.php delete mode 100644 lib/Twig/Grammar/Switch.php delete mode 100644 lib/Twig/Grammar/Tag.php delete mode 100644 lib/Twig/GrammarInterface.php delete mode 100644 lib/Twig/SimpleTokenParser.php delete mode 100644 test/Twig/Tests/Grammar/ArgumentsTest.php delete mode 100644 test/Twig/Tests/Grammar/ArrayTest.php delete mode 100644 test/Twig/Tests/Grammar/BodyTest.php delete mode 100644 test/Twig/Tests/Grammar/BooleanTest.php delete mode 100644 test/Twig/Tests/Grammar/ConstantTest.php delete mode 100644 test/Twig/Tests/Grammar/ExpressionTest.php delete mode 100644 test/Twig/Tests/Grammar/NumberTest.php delete mode 100644 test/Twig/Tests/Grammar/OptionalTest.php delete mode 100644 test/Twig/Tests/Grammar/TagTest.php delete mode 100644 test/Twig/Tests/SimpleTokenParser.php delete mode 100644 test/Twig/Tests/SimpleTokenParserTest.php delete mode 100644 test/Twig/Tests/grammarTest.php diff --git a/CHANGELOG b/CHANGELOG index 72ff1b4..5f76db1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -10,6 +10,7 @@ Backward incompatibilities: * the "autoescape" first argument is now "true"/"false" (instead of "on"/"off") * the "parent" tag has been replaced by a "parent" function ({{ parent() }} instead of {% parent %}) * the "display" tag has been replaced by a "block" function ({{ block('title') }} instead of {% display title %}) + * removed the grammar and simple token parser (moved to the Twig Extensions repository) Changes: diff --git a/lib/Twig/Grammar.php b/lib/Twig/Grammar.php deleted file mode 100644 index a9c6e3d..0000000 --- a/lib/Twig/Grammar.php +++ /dev/null @@ -1,30 +0,0 @@ -name = $name; - } - - public function setParser(Twig_ParserInterface $parser) - { - $this->parser = $parser; - } - - public function getName() - { - return $this->name; - } -} diff --git a/lib/Twig/Grammar/Arguments.php b/lib/Twig/Grammar/Arguments.php deleted file mode 100644 index d0d3f91..0000000 --- a/lib/Twig/Grammar/Arguments.php +++ /dev/null @@ -1,22 +0,0 @@ -', $this->name); - } - - public function parse(Twig_Token $token) - { - return $this->parser->getExpressionParser()->parseArguments(); - } -} diff --git a/lib/Twig/Grammar/Array.php b/lib/Twig/Grammar/Array.php deleted file mode 100644 index 7605e9e..0000000 --- a/lib/Twig/Grammar/Array.php +++ /dev/null @@ -1,22 +0,0 @@ -', $this->name); - } - - public function parse(Twig_Token $token) - { - return $this->parser->getExpressionParser()->parseArrayExpression(); - } -} diff --git a/lib/Twig/Grammar/Body.php b/lib/Twig/Grammar/Body.php deleted file mode 100644 index 081d43d..0000000 --- a/lib/Twig/Grammar/Body.php +++ /dev/null @@ -1,39 +0,0 @@ -end = null === $end ? 'end'.$name : $end; - } - - public function __toString() - { - return sprintf('<%s:body>', $this->name); - } - - public function parse(Twig_Token $token) - { - $stream = $this->parser->getStream(); - $stream->expect(Twig_Token::BLOCK_END_TYPE); - - return $this->parser->subparse(array($this, 'decideBlockEnd'), true); - } - - public function decideBlockEnd($token) - { - return $token->test($this->end); - } -} diff --git a/lib/Twig/Grammar/Boolean.php b/lib/Twig/Grammar/Boolean.php deleted file mode 100644 index 02a6070..0000000 --- a/lib/Twig/Grammar/Boolean.php +++ /dev/null @@ -1,24 +0,0 @@ -', $this->name); - } - - public function parse(Twig_Token $token) - { - $this->parser->getStream()->expect(Twig_Token::NAME_TYPE, array('true', 'false')); - - return new Twig_Node_Expression_Constant('true' === $token->getValue() ? true : false, $token->getLine()); - } -} diff --git a/lib/Twig/Grammar/Constant.php b/lib/Twig/Grammar/Constant.php deleted file mode 100644 index 1f523b8..0000000 --- a/lib/Twig/Grammar/Constant.php +++ /dev/null @@ -1,37 +0,0 @@ -name = $name; - $this->type = null === $type ? Twig_Token::NAME_TYPE : $type; - } - - public function __toString() - { - return $this->name; - } - - public function parse(Twig_Token $token) - { - $this->parser->getStream()->expect($this->type, $this->name); - - return $this->name; - } - - public function getType() - { - return $this->type; - } -} diff --git a/lib/Twig/Grammar/Expression.php b/lib/Twig/Grammar/Expression.php deleted file mode 100644 index 43012f3..0000000 --- a/lib/Twig/Grammar/Expression.php +++ /dev/null @@ -1,22 +0,0 @@ -', $this->name); - } - - public function parse(Twig_Token $token) - { - return $this->parser->getExpressionParser()->parseExpression(); - } -} diff --git a/lib/Twig/Grammar/Hash.php b/lib/Twig/Grammar/Hash.php deleted file mode 100644 index e59d1d7..0000000 --- a/lib/Twig/Grammar/Hash.php +++ /dev/null @@ -1,22 +0,0 @@ -', $this->name); - } - - public function parse(Twig_Token $token) - { - return $this->parser->getExpressionParser()->parseHashExpression(); - } -} diff --git a/lib/Twig/Grammar/Number.php b/lib/Twig/Grammar/Number.php deleted file mode 100644 index 0ce3f16..0000000 --- a/lib/Twig/Grammar/Number.php +++ /dev/null @@ -1,24 +0,0 @@ -', $this->name); - } - - public function parse(Twig_Token $token) - { - $this->parser->getStream()->expect(Twig_Token::NUMBER_TYPE); - - return new Twig_Node_Expression_Constant($token->getValue(), $token->getLine()); - } -} diff --git a/lib/Twig/Grammar/Optional.php b/lib/Twig/Grammar/Optional.php deleted file mode 100644 index 3b98426..0000000 --- a/lib/Twig/Grammar/Optional.php +++ /dev/null @@ -1,69 +0,0 @@ -grammar = array(); - foreach (func_get_args() as $grammar) { - $this->addGrammar($grammar); - } - } - - public function __toString() - { - $repr = array(); - foreach ($this->grammar as $grammar) { - $repr[] = (string) $grammar; - } - - return sprintf('[%s]', implode(' ', $repr)); - } - - public function addGrammar(Twig_GrammarInterface $grammar) - { - $this->grammar[] = $grammar; - } - - public function parse(Twig_Token $token) - { - // test if we have the optional element before consuming it - if ($this->grammar[0] instanceof Twig_Grammar_Constant) { - if (!$this->parser->getStream()->test($this->grammar[0]->getType(), $this->grammar[0]->getName())) { - return array(); - } - } elseif ($this->grammar[0] instanceof Twig_Grammar_Name) { - if (!$this->parser->getStream()->test(Twig_Token::NAME_TYPE)) { - return array(); - } - } elseif ($this->parser->getStream()->test(Twig_Token::BLOCK_END_TYPE)) { - // if this is not a Constant or a Name, it must be the last element of the tag - - return array(); - } - - $elements = array(); - foreach ($this->grammar as $grammar) { - $grammar->setParser($this->parser); - - $element = $grammar->parse($token); - if (is_array($element)) { - $elements = array_merge($elements, $element); - } else { - $elements[$grammar->getName()] = $element; - } - } - - return $elements; - } -} diff --git a/lib/Twig/Grammar/Switch.php b/lib/Twig/Grammar/Switch.php deleted file mode 100644 index c5e5ff8..0000000 --- a/lib/Twig/Grammar/Switch.php +++ /dev/null @@ -1,24 +0,0 @@ -', $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()); - } -} diff --git a/lib/Twig/Grammar/Tag.php b/lib/Twig/Grammar/Tag.php deleted file mode 100644 index 2aad31a..0000000 --- a/lib/Twig/Grammar/Tag.php +++ /dev/null @@ -1,56 +0,0 @@ -grammar = array(); - foreach (func_get_args() as $grammar) { - $this->addGrammar($grammar); - } - } - - public function __toString() - { - $repr = array(); - foreach ($this->grammar as $grammar) { - $repr[] = (string) $grammar; - } - - return implode(' ', $repr); - } - - public function addGrammar(Twig_GrammarInterface $grammar) - { - $this->grammar[] = $grammar; - } - - public function parse(Twig_Token $token) - { - $elements = array(); - foreach ($this->grammar as $grammar) { - $grammar->setParser($this->parser); - - $element = $grammar->parse($token); - if (is_array($element)) { - $elements = array_merge($elements, $element); - } else { - $elements[$grammar->getName()] = $element; - } - } - - $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE); - - return $elements; - } -} diff --git a/lib/Twig/GrammarInterface.php b/lib/Twig/GrammarInterface.php deleted file mode 100644 index efb005c..0000000 --- a/lib/Twig/GrammarInterface.php +++ /dev/null @@ -1,18 +0,0 @@ -getGrammar(); - if (!is_object($grammar)) { - $grammar = self::parseGrammar($grammar); - } - - $grammar->setParser($this->parser); - $values = $grammar->parse($token); - - return $this->getNode($values, $token->getLine()); - } - - /** - * Gets the grammar as an object or as a string. - * - * @return string|Twig_Grammar A Twig_Grammar instance or a string - */ - abstract protected function getGrammar(); - - /** - * Gets the nodes based on the parsed values. - * - * @param array $values An array of values - * @param integer $line The parser line - */ - abstract protected function getNode(array $values, $line); - - protected function getAttribute($node, $attribute, $arguments = array(), $type = Twig_Node_Expression_GetAttr::TYPE_ANY, $line = -1) - { - return new Twig_Node_Expression_GetAttr( - $node instanceof Twig_NodeInterface ? $node : new Twig_Node_Expression_Name($node, $line), - $attribute instanceof Twig_NodeInterface ? $attribute : new Twig_Node_Expression_Constant($attribute, $line), - $arguments instanceof Twig_NodeInterface ? $arguments : new Twig_Node($arguments), - $type, - $line - ); - } - - protected function call($node, $attribute, $arguments = array(), $line = -1) - { - return $this->getAttribute($node, $attribute, $arguments, Twig_Node_Expression_GetAttr::TYPE_METHOD, $line); - } - - protected function markAsSafe(Twig_NodeInterface $node, $line = -1) - { - return new Twig_Node_Expression_Filter( - $node, - new Twig_Node_Expression_Constant('raw', $line), - new Twig_Node(), - $line - ); - } - - protected function output(Twig_NodeInterface $node, $line = -1) - { - return new Twig_Node_Print($node, $line); - } - - protected function getNodeValues(array $values) - { - $nodes = array(); - foreach ($values as $value) { - if ($value instanceof Twig_NodeInterface) { - $nodes[] = $value; - } - } - - return $nodes; - } - - static public function parseGrammar($str, $main = true) - { - static $cursor; - - if (true === $main) { - $cursor = 0; - $grammar = new Twig_Grammar_Tag(); - } else { - $grammar = new Twig_Grammar_Optional(); - } - - while ($cursor < strlen($str)) { - if (preg_match('/\s+/A', $str, $match, null, $cursor)) { - $cursor += strlen($match[0]); - } elseif (preg_match('/<(\w+)(?:\:(\w+))?>/A', $str, $match, null, $cursor)) { - $class = sprintf('Twig_Grammar_%s', ucfirst(isset($match[2]) ? $match[2] : 'Expression')); - if (!class_exists($class)) { - throw new Twig_Error_Runtime(sprintf('Unable to understand "%s" in grammar (%s class does not exist)', $match[0], $class)); - } - $grammar->addGrammar(new $class($match[1])); - $cursor += strlen($match[0]); - } elseif (preg_match('/\w+/A', $str, $match, null, $cursor)) { - $grammar->addGrammar(new Twig_Grammar_Constant($match[0])); - $cursor += strlen($match[0]); - } elseif (preg_match('/,/A', $str, $match, null, $cursor)) { - $grammar->addGrammar(new Twig_Grammar_Constant($match[0], Twig_Token::PUNCTUATION_TYPE)); - $cursor += strlen($match[0]); - } elseif (preg_match('/\[/A', $str, $match, null, $cursor)) { - $cursor += strlen($match[0]); - $grammar->addGrammar(self::parseGrammar($str, false)); - } elseif (true !== $main && preg_match('/\]/A', $str, $match, null, $cursor)) { - $cursor += strlen($match[0]); - - return $grammar; - } else { - throw new Twig_Error_Runtime(sprintf('Unable to parse grammar "%s" near "...%s..."', $str, substr($str, $cursor, 10))); - } - } - - return $grammar; - } -} diff --git a/test/Twig/Tests/Grammar/ArgumentsTest.php b/test/Twig/Tests/Grammar/ArgumentsTest.php deleted file mode 100644 index 1578600..0000000 --- a/test/Twig/Tests/Grammar/ArgumentsTest.php +++ /dev/null @@ -1,19 +0,0 @@ -assertEquals('', (string) $grammar); - } -} diff --git a/test/Twig/Tests/Grammar/ArrayTest.php b/test/Twig/Tests/Grammar/ArrayTest.php deleted file mode 100644 index 7af1774..0000000 --- a/test/Twig/Tests/Grammar/ArrayTest.php +++ /dev/null @@ -1,19 +0,0 @@ -assertEquals('', (string) $grammar); - } -} diff --git a/test/Twig/Tests/Grammar/BodyTest.php b/test/Twig/Tests/Grammar/BodyTest.php deleted file mode 100644 index d342675..0000000 --- a/test/Twig/Tests/Grammar/BodyTest.php +++ /dev/null @@ -1,19 +0,0 @@ -assertEquals('', (string) $grammar); - } -} diff --git a/test/Twig/Tests/Grammar/BooleanTest.php b/test/Twig/Tests/Grammar/BooleanTest.php deleted file mode 100644 index 6cae563..0000000 --- a/test/Twig/Tests/Grammar/BooleanTest.php +++ /dev/null @@ -1,19 +0,0 @@ -assertEquals('', (string) $grammar); - } -} diff --git a/test/Twig/Tests/Grammar/ConstantTest.php b/test/Twig/Tests/Grammar/ConstantTest.php deleted file mode 100644 index f293c8b..0000000 --- a/test/Twig/Tests/Grammar/ConstantTest.php +++ /dev/null @@ -1,19 +0,0 @@ -assertEquals('foo', (string) $grammar); - } -} diff --git a/test/Twig/Tests/Grammar/ExpressionTest.php b/test/Twig/Tests/Grammar/ExpressionTest.php deleted file mode 100644 index 2919196..0000000 --- a/test/Twig/Tests/Grammar/ExpressionTest.php +++ /dev/null @@ -1,19 +0,0 @@ -assertEquals('', (string) $grammar); - } -} diff --git a/test/Twig/Tests/Grammar/NumberTest.php b/test/Twig/Tests/Grammar/NumberTest.php deleted file mode 100644 index 4749803..0000000 --- a/test/Twig/Tests/Grammar/NumberTest.php +++ /dev/null @@ -1,19 +0,0 @@ -assertEquals('', (string) $grammar); - } -} diff --git a/test/Twig/Tests/Grammar/OptionalTest.php b/test/Twig/Tests/Grammar/OptionalTest.php deleted file mode 100644 index 049f501..0000000 --- a/test/Twig/Tests/Grammar/OptionalTest.php +++ /dev/null @@ -1,19 +0,0 @@ -assertEquals('[foo ]', (string) $grammar); - } -} diff --git a/test/Twig/Tests/Grammar/TagTest.php b/test/Twig/Tests/Grammar/TagTest.php deleted file mode 100644 index 1441e14..0000000 --- a/test/Twig/Tests/Grammar/TagTest.php +++ /dev/null @@ -1,23 +0,0 @@ -assertEquals('foo [foo ]', (string) $grammar); - } -} diff --git a/test/Twig/Tests/SimpleTokenParser.php b/test/Twig/Tests/SimpleTokenParser.php deleted file mode 100644 index 567d133..0000000 --- a/test/Twig/Tests/SimpleTokenParser.php +++ /dev/null @@ -1,48 +0,0 @@ -tag = $tag; - $this->grammar = $grammar; - } - - public function getGrammar() - { - return $this->grammar; - } - - public function getTag() - { - return $this->tag; - } - - public function getNode(array $values, $line) - { - $nodes = array(); - $nodes[] = new Twig_Node_Print(new Twig_Node_Expression_Constant('|', $line), $line); - foreach ($values as $value) { - if ($value instanceof Twig_NodeInterface) { - $nodes[] = new Twig_Node_Print($value, $line); - } else { - $nodes[] = new Twig_Node_Print(new Twig_Node_Expression_Constant($value, $line), $line); - } - $nodes[] = new Twig_Node_Print(new Twig_Node_Expression_Constant('|', $line), $line); - } - - return new Twig_Node($nodes); - } -} \ No newline at end of file diff --git a/test/Twig/Tests/SimpleTokenParserTest.php b/test/Twig/Tests/SimpleTokenParserTest.php deleted file mode 100644 index 4db10fd..0000000 --- a/test/Twig/Tests/SimpleTokenParserTest.php +++ /dev/null @@ -1,112 +0,0 @@ -assertEquals($grammar, Twig_SimpleTokenParser::parseGrammar($str), '::parseGrammar() parses a grammar'); - } - - public function testParseGrammarExceptions() - { - try { - Twig_SimpleTokenParser::parseGrammar(''); - $this->fail(); - } catch (Exception $e) { - $this->assertEquals('Twig_Error_Runtime', get_class($e)); - } - - try { - Twig_SimpleTokenParser::parseGrammar('fail(); - } catch (Exception $e) { - $this->assertEquals('Twig_Error_Runtime', get_class($e)); - } - - try { - Twig_SimpleTokenParser::parseGrammar(' (with'); - $this->fail(); - } catch (Exception $e) { - $this->assertEquals('Twig_Error_Runtime', get_class($e)); - } - } - - public function getTests() - { - return array( - array('', new Twig_Grammar_Tag()), - array('const', new Twig_Grammar_Tag( - new Twig_Grammar_Constant('const') - )), - array(' const ', new Twig_Grammar_Tag( - new Twig_Grammar_Constant('const') - )), - array('', new Twig_Grammar_Tag( - new Twig_Grammar_Expression('expr') - )), - array('', new Twig_Grammar_Tag( - new Twig_Grammar_Expression('expr') - )), - array(' ', new Twig_Grammar_Tag( - new Twig_Grammar_Expression('expr') - )), - array('', new Twig_Grammar_Tag( - new Twig_Grammar_Number('nb') - )), - array('', new Twig_Grammar_Tag( - new Twig_Grammar_Boolean('bool') - )), - array('', new Twig_Grammar_Tag( - new Twig_Grammar_Body('content') - )), - array(' [with ]', new Twig_Grammar_Tag( - new Twig_Grammar_Expression('expr'), - new Twig_Grammar_Optional( - new Twig_Grammar_Constant('with'), - new Twig_Grammar_Array('arguments') - ) - )), - array(' [ with ] ', new Twig_Grammar_Tag( - new Twig_Grammar_Expression('expr'), - new Twig_Grammar_Optional( - new Twig_Grammar_Constant('with'), - new Twig_Grammar_Array('arguments') - ) - )), - array(' [with [or ]]', new Twig_Grammar_Tag( - new Twig_Grammar_Expression('expr'), - new Twig_Grammar_Optional( - new Twig_Grammar_Constant('with'), - new Twig_Grammar_Array('arguments'), - new Twig_Grammar_Optional( - new Twig_Grammar_Constant('or'), - new Twig_Grammar_Expression('optional') - ) - ) - )), - array(' [with [, ]]', new Twig_Grammar_Tag( - new Twig_Grammar_Expression('expr'), - new Twig_Grammar_Optional( - new Twig_Grammar_Constant('with'), - new Twig_Grammar_Array('arguments'), - new Twig_Grammar_Optional( - new Twig_Grammar_Constant(',', Twig_Token::PUNCTUATION_TYPE), - new Twig_Grammar_Expression('optional') - ) - ) - )), - ); - } -} diff --git a/test/Twig/Tests/grammarTest.php b/test/Twig/Tests/grammarTest.php deleted file mode 100644 index 0a63d13..0000000 --- a/test/Twig/Tests/grammarTest.php +++ /dev/null @@ -1,63 +0,0 @@ - false)); - $twig->addTokenParser(new SimpleTokenParser($tag, $grammar)); - - $ok = true; - try { - $template = $twig->loadTemplate($template); - } catch (Exception $e) { - $ok = false; - - if (false === $exception) { - $this->fail('Exception not expected'); - } else { - $this->assertEquals($exception, get_class($e)); - } - } - - if ($ok) { - if (false !== $exception) { - $this->fail(sprintf('Exception "%s" expected', $exception)); - } - - $actual = $template->render(array()); - $this->assertEquals($output, $actual); - } - } - - public function getTests() - { - return array( - array('foo1', '', '{% foo1 %}', '|', false), - array('foo2', '', '{% foo2 "bar" %}', '|', 'Twig_Error_Syntax'), - array('foo3', '', '{% foo3 "bar" %}', '|bar|', false), - array('foo4', '', '{% foo4 1 + 2 %}', '|3|', false), - array('foo5', '', '{% foo5 1 + 2 %}', '|3|', false), - array('foo6', '', '{% foo6 1 + 2 %}', '|3|', 'Twig_Error_Syntax'), - array('foo7', '', '{% foo7 %}', '|3|', 'Twig_Error_Syntax'), - array('foo8', '', '{% foo8 [1, 2] %}', '|Array|', false), - array('foo9', ' with ', '{% foo9 "bar" with "foobar" %}', '|bar|with|foobar|', false), - array('foo10', ' [with ]', '{% foo10 "bar" with "foobar" %}', '|bar|with|foobar|', false), - array('foo11', ' [with ]', '{% foo11 "bar" %}', '|bar|', false), - ); - } -} -- 1.7.2.5