def filter_stream(self, stream):
while not stream.eos:<EOL><INDENT>token = next(stream)<EOL>if token.test("<STR_LIT>"):<EOL><INDENT>var_expr = []<EOL>while not token.test("<STR_LIT>"):<EOL><INDENT>var_expr.append(token)<EOL>token = next(stream)<EOL><DEDENT>variable_end = token<EOL>last_token = var_expr[-<NUM_LIT:1>]<EOL>if (not last_token.test("<STR_LIT:name>") <EOL>or not last_token.value in ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>')):<EOL><INDENT>param_name = self.extract_param_name(var_expr)<EOL>var_expr.append(Token(<NUM_LIT:10>, '<STR_LIT>', u'<STR_LIT:|>'))<EOL>var_expr.append(Token(<NUM_LIT:10>, '<STR_LIT:name>', u'<STR_LIT>'))<EOL>var_expr.append(Token(<NUM_LIT:2>, '<STR_LIT>', u'<STR_LIT:(>'))<EOL>var_expr.append(Token(<NUM_LIT:10>, '<STR_LIT:string>', param_name))<EOL>var_expr.append(Token(<NUM_LIT:2>, '<STR_LIT>', u'<STR_LIT:)>'))<EOL><DEDENT>var_expr.append(variable_end)<EOL>for token in var_expr:<EOL><INDENT>yield token<EOL><DEDENT><DEDENT>else:<EOL><INDENT>yield token<EOL><DEDENT><DEDENT>
We convert 
{{ some.variable | filter1 | filter 2}}
    to 
{{ some.variable | filter1 | filter 2 | bind}}

... for all variable declarations in the template

This function is called by jinja2 immediately 
after the lexing stage, but before the parser is called.