From 84684d9d64686a60fb169cf2f8889424524fd3cc Mon Sep 17 00:00:00 2001 From: fabien Date: Wed, 14 Oct 2009 06:39:47 +0000 Subject: [PATCH] added the possibility look more than one token in the token stream git-svn-id: http://svn.twig-project.org/trunk@40 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- lib/Twig/TokenStream.php | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Twig/TokenStream.php b/lib/Twig/TokenStream.php index 7b255d5..9c63819 100644 --- a/lib/Twig/TokenStream.php +++ b/lib/Twig/TokenStream.php @@ -47,8 +47,10 @@ class Twig_TokenStream /** * Sets the pointer to the next token and returns the old one. + * + * @param Boolean $fromStack Whether to get a token from the stack or not */ - public function next() + public function next($fromStack = true) { if (!empty($this->pushed)) { @@ -91,7 +93,7 @@ class Twig_TokenStream */ public function look() { - $old = $this->next(); + $old = $this->next(false); $new = $this->current; $this->push($old); $this->push($new); -- 1.7.2.5