projects
/
jinja2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8edbe49
)
assignments are traversed in the correct order now
author
Armin Ronacher
<armin.ronacher@active-4.com>
Thu, 10 Apr 2008 18:51:23 +0000
(20:51 +0200)
committer
Armin Ronacher
<armin.ronacher@active-4.com>
Thu, 10 Apr 2008 18:51:23 +0000
(20:51 +0200)
--HG--
branch : trunk
jinja2/compiler.py
patch
|
blob
|
history
diff --git
a/jinja2/compiler.py
b/jinja2/compiler.py
index 48c9d9973087382ac9257b27b401384fa7cf2e5b..65912c7a726b404b7e7befe64b1641d1e512999b 100644
(file)
--- 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