OLD | NEW |
1 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
2 """ | 2 """ |
3 jinja2.parser | 3 jinja2.parser |
4 ~~~~~~~~~~~~~ | 4 ~~~~~~~~~~~~~ |
5 | 5 |
6 Implements the template parser. | 6 Implements the template parser. |
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 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
886 if end_tokens is not None: | 886 if end_tokens is not None: |
887 self._end_token_stack.pop() | 887 self._end_token_stack.pop() |
888 | 888 |
889 return body | 889 return body |
890 | 890 |
891 def parse(self): | 891 def parse(self): |
892 """Parse the whole template into a `Template` node.""" | 892 """Parse the whole template into a `Template` node.""" |
893 result = nodes.Template(self.subparse(), lineno=1) | 893 result = nodes.Template(self.subparse(), lineno=1) |
894 result.set_environment(self.environment) | 894 result.set_environment(self.environment) |
895 return result | 895 return result |
OLD | NEW |