| OLD | NEW |
| 1 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
| 2 """ | 2 """ |
| 3 jinja2.compiler | 3 jinja2.compiler |
| 4 ~~~~~~~~~~~~~~~ | 4 ~~~~~~~~~~~~~~~ |
| 5 | 5 |
| 6 Compiles nodes into python code. | 6 Compiles nodes into python code. |
| 7 | 7 |
| 8 :copyright: (c) 2010 by the Jinja Team. | 8 :copyright: (c) 2010 by the Jinja Team. |
| 9 :license: BSD, see LICENSE for more details. | 9 :license: BSD, see LICENSE for more details. |
| 10 """ | 10 """ |
| (...skipping 1620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1631 | 1631 |
| 1632 def visit_ScopedEvalContextModifier(self, node, frame): | 1632 def visit_ScopedEvalContextModifier(self, node, frame): |
| 1633 old_ctx_name = self.temporary_identifier() | 1633 old_ctx_name = self.temporary_identifier() |
| 1634 safed_ctx = frame.eval_ctx.save() | 1634 safed_ctx = frame.eval_ctx.save() |
| 1635 self.writeline('%s = context.eval_ctx.save()' % old_ctx_name) | 1635 self.writeline('%s = context.eval_ctx.save()' % old_ctx_name) |
| 1636 self.visit_EvalContextModifier(node, frame) | 1636 self.visit_EvalContextModifier(node, frame) |
| 1637 for child in node.body: | 1637 for child in node.body: |
| 1638 self.visit(child, frame) | 1638 self.visit(child, frame) |
| 1639 frame.eval_ctx.revert(safed_ctx) | 1639 frame.eval_ctx.revert(safed_ctx) |
| 1640 self.writeline('context.eval_ctx.revert(%s)' % old_ctx_name) | 1640 self.writeline('context.eval_ctx.revert(%s)' % old_ctx_name) |
| OLD | NEW |