From: Armin Ronacher Date: Thu, 10 Apr 2008 18:51:23 +0000 (+0200) Subject: assignments are traversed in the correct order now X-Git-Tag: 2.0rc1~192 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ebe55aa9df755a2175b739b40b659db5130a964c;p=jinja2.git assignments are traversed in the correct order now --HG-- branch : trunk --- diff --git a/jinja2/compiler.py b/jinja2/compiler.py index 48c9d99..65912c7 100644 --- a/jinja2/compiler.py +++ b/jinja2/compiler.py @@ -160,6 +160,11 @@ class FrameIdentifierVisitor(NodeVisitor): """Macros set local.""" self.identifiers.declared_locally.add(node.name) + def visit_Assign(self, node): + """Visit assignments in the correct order.""" + self.visit(node.node) + self.visit(node.target) + # stop traversing at instructions that have their own scope. visit_Block = visit_CallBlock = visit_FilterBlock = \ visit_For = lambda s, n: None