Added the `meta` module.
--HG--
branch : trunk
diff --git a/docs/api.rst b/docs/api.rst
index 5383293..5a1e29a 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -665,3 +665,17 @@
change it in a backwards incompatible way but modifications in the Jinja2
core may shine through. For example if Jinja2 introduces a new AST node
in later versions that may be returned by :meth:`~Environment.parse`.
+
+The Meta API
+------------
+
+.. versionadded:: 2.2
+
+The meta API returns some information about abstract syntax trees that
+could help applications to implement more advanced template concepts. All
+the functions of the meta API operate on an abstract syntax tree as
+returned by the :meth:`Environment.parse` method.
+
+.. autofunction:: jinja2.meta.find_undeclared_variables
+
+.. autofunction:: jinja2.meta.find_referenced_templates
diff --git a/docs/conf.py b/docs/conf.py
index 3bd30e1..ba90c49 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -95,9 +95,6 @@
# typographically correct entities.
#html_use_smartypants = True
-# use jinja2 for templates
-template_bridge = 'jinjaext.Jinja2Bridge'
-
# no modindex
html_use_modindex = False
diff --git a/docs/jinjaext.py b/docs/jinjaext.py
index 212c8bf..66f4ba1 100644
--- a/docs/jinjaext.py
+++ b/docs/jinjaext.py
@@ -77,16 +77,6 @@
}
-class Jinja2Bridge(TemplateBridge):
-
- def init(self, builder):
- path = builder.config.templates_path
- self.env = Environment(loader=FileSystemLoader(path))
-
- def render(self, template, context):
- return self.env.get_template(template).render(context)
-
-
_sig_re = re.compile(r'^[a-zA-Z_][a-zA-Z0-9_]*(\(.*?\))')