a clean restart
[jinja2.git] / jinja2 / translators / __init__.py
1 # -*- coding: utf-8 -*-
2 """
3     jinja.translators
4     ~~~~~~~~~~~~~~~~~
5
6     The submodules of this module provide translators for the jinja ast.
7
8     :copyright: 2007 by Armin Ronacher.
9     :license: BSD, see LICENSE for more details.
10 """
11
12
13 class Translator(object):
14     """
15     Base class of all translators.
16     """
17
18     def process(environment, tree, source=None):
19         """
20         Process the given ast with the rules defined in
21         environment and return a translated version of it.
22         The translated object can be anything. The python
23         translator for example outputs Template instances,
24         a javascript translator would probably output strings.
25
26         This is a static function.
27         """
28         pass
29     process = staticmethod(process)