From: fabien Date: Wed, 14 Oct 2009 06:39:47 +0000 (+0000) Subject: added the possibility look more than one token in the token stream X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=84684d9d64686a60fb169cf2f8889424524fd3cc;p=web%2Fkonrad%2Ftwig.git 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 --- 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);