OLD | NEW |
1 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
2 """ | 2 """ |
3 jinja2.nodes | 3 jinja2.nodes |
4 ~~~~~~~~~~~~ | 4 ~~~~~~~~~~~~ |
5 | 5 |
6 This module implements additional nodes derived from the ast base node. | 6 This module implements additional nodes derived from the ast base node. |
7 | 7 |
8 It also provides some node tree helper functions like `in_lineno` and | 8 It also provides some node tree helper functions like `in_lineno` and |
9 `get_nodes` used by the parser and translator in order to normalize | 9 `get_nodes` used by the parser and translator in order to normalize |
10 python and jinja nodes. | 10 python and jinja nodes. |
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
905 :class:`EvalContextModifier` but will only modify the | 905 :class:`EvalContextModifier` but will only modify the |
906 :class:`~jinja2.nodes.EvalContext` for nodes in the :attr:`body`. | 906 :class:`~jinja2.nodes.EvalContext` for nodes in the :attr:`body`. |
907 """ | 907 """ |
908 fields = ('body',) | 908 fields = ('body',) |
909 | 909 |
910 | 910 |
911 # make sure nobody creates custom nodes | 911 # make sure nobody creates custom nodes |
912 def _failing_new(*args, **kwargs): | 912 def _failing_new(*args, **kwargs): |
913 raise TypeError('can\'t create custom node types') | 913 raise TypeError('can\'t create custom node types') |
914 NodeType.__new__ = staticmethod(_failing_new); del _failing_new | 914 NodeType.__new__ = staticmethod(_failing_new); del _failing_new |
OLD | NEW |