fabpot/Twig — pull request #663 by badlee (2012-03-12 17:05:40+00:00)
Title: Define lexer option via Twig_Environment

I update Twig_Environment in **Twig/Envirenment.php** for suport lexer option
add after line ```protected $staging;``` : ```protected $lexerOptions;```
add after line ```'auto_reload' => null,``` : ```'lexer' => array(),```
add after line ```$this->debug = (bool) $options['debug'];``` : ```$this->lexerOptions = (array) $options['lexer'];```
update line ```$this->lexer = new Twig_Lexer($this);``` to ```$this->lexer = new Twig_Lexer($this,$this->lexerOptions);```

now i can change lexer tag :

```php
array(
'tag_comment' => array(''),/*default array('{#', '#}')*/
'tag_block' => array(''),/*default array('{%', '%}')*/
'tag_variable' => array(''),/*default array('{{', '}}')*/
)
))
?>
```

** Twig syntax **

before new lexer option

```html
{# new twig syntax #}

{% macro input(name, value, type, size) %}

{% endmacro %}

{{ _self.input('username') }}

```
after new lexer option

```html

```

You can add this update to **next version** ?

***PS:** Excuse my english i'm french speaker*