$this->stream->next();
}
+ if (1 === count($rv)) {
+ return $rv[0];
+ }
+
return new Twig_Node($rv, array(), $lineno);
}
}
}
+ if (1 === count($rv)) {
+ return $rv[0];
+ }
+
return new Twig_Node($rv, array(), $lineno);
}
$stream = $env->tokenize($template, 'index');
$parser = new Twig_Parser($env);
- $this->assertEquals($expected, $parser->parse($stream)->getNode('body')->getNode(0)->getNode('expr'));
+ $this->assertEquals($expected, $parser->parse($stream)->getNode('body')->getNode('expr'));
}
/**