mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 19:36:43 +00:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user