From 6859c089afb4606c7b33841430bbf485df2ad5bb Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 7 Nov 2010 14:37:08 +0100 Subject: [PATCH] added a note about using rewind() after look() --- doc/04-Extending-Twig.markdown | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/doc/04-Extending-Twig.markdown b/doc/04-Extending-Twig.markdown index e4b3f0b..eee93af 100644 --- a/doc/04-Extending-Twig.markdown +++ b/doc/04-Extending-Twig.markdown @@ -491,7 +491,8 @@ from the token stream (`$this->parser->getStream()`): token). * `look()`: Looks a the next token. This is how you can have a look at the - next token without consuming it. + next token without consuming it (after you are done with `look()`, you must + use `rewind()`). Parsing expressions is done by calling the `parseExpression()` like we did for the `set` tag. -- 1.7.2.5