updated doc (closes #100)

This commit is contained in:
Fabien Potencier
2010-08-14 09:05:04 +02:00
parent 5adc74c5dd
commit ebe8f237f8
+2 -8
View File
@@ -408,7 +408,7 @@ Let's create a simple `set` tag that allows the definition of simple variables
from within a template. The tag can be used like follows:
[twig]
{% set name as "value" %}
{% set name = "value" %}
{{ name }}
@@ -460,7 +460,7 @@ Now, let's see the actual code of this class:
{
$lineno = $token->getLine();
$name = $this->parser->getStream()->expect(Twig_Token::NAME_TYPE)->getValue();
$this->parser->getStream()->expect(Twig_Token::NAME_TYPE, 'as');
$this->parser->getStream()->expect(Twig_Token::NAME_TYPE, '=');
$value = $this->parser->getExpressionParser()->parseExpression();
$this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
@@ -538,12 +538,6 @@ developer generate beautiful and readable PHP code:
* `repr()`: Writes a PHP representation of a given value (see `Twig_Node_For`
for a usage example).
* `pushContext()`: Pushes the current context on the stack (see
`Twig_Node_For` for a usage example).
* `popContext()`: Pops a context from the stack (see `Twig_Node_For` for a
usage example).
* `addDebugInfo()`: Adds the line of the original template file related to
the current node as a comment.