Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Str Str Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body If UnaryOpNot Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body If Call NameLoad AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body For NameStore AttributeLoad AttributeLoad NameLoad attr attr body If Call NameLoad NameLoad AttributeLoad NameLoad attr body If Call NameLoad AttributeLoad NameLoad attr NameLoad body Expr Yield AttributeLoad NameLoad attr orelse Expr Yield NameLoad orelse Expr Yield NameLoad Continue If Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Yield AttributeLoad AttributeLoad NameLoad attr attr orelse If BoolOpAnd Call NameLoad NameLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad NameLoad body For NameStore AttributeLoad AttributeLoad NameLoad attr attr body If Call NameLoad NameLoad NameLoad body Expr Yield NameLoad orelse Expr Yield NameLoad decorator_list
N/A N/A 
    jinja2.meta
    ~~~~~~~~~~~

    This module implements various functions that exposes information about
    templates that might be interesting for various kinds of applications.

    :copyright: (c) 2010 by the Jinja Team, see AUTHORS for more details.
    :license: BSD, see LICENSE for more details.
 jinja2 nodes jinja2.compiler CodeGenerator jinja2._compat string_types TrackingCodeGenerator N/A CodeGenerator N/A N/A We abuse the code generator for introspection. __init__ N/A N/A self environment N/A N/A N/A N/A N/A CodeGenerator __init__ self environment <introspection> <introspection> N/A N/A self undeclared_identifiers N/A set N/A write N/A N/A self x N/A N/A N/A Don't write. N/A pull_locals N/A N/A self frame N/A N/A N/A Remember all undeclared identifiers. N/A N/A N/A N/A self undeclared_identifiers update N/A N/A frame identifiers undeclared N/A N/A find_undeclared_variables N/A N/A ast N/A N/A N/A Returns a set of all variables in the AST that will be looked up from
    the context at runtime.  Because at compile time it's not known which
    variables will be used depending on the path the execution takes at
    runtime, all variables are returned.

    >>> from jinja2 import Environment, meta
    >>> env = Environment()
    >>> ast = env.parse('{% set foo = 42 %}{{ bar + foo }}')
    >>> meta.find_undeclared_variables(ast)
    set(['bar'])

    .. admonition:: Implementation

       Internally the code generator is used for finding undeclared variables.
       This is good to know because the code generator might raise a
       :exc:`TemplateAssertionError` during compilation and as a matter of
       fact this function can currently raise that exception as well.
     N/A codegen N/A TrackingCodeGenerator N/A ast environment N/A N/A N/A codegen visit ast N/A N/A codegen undeclared_identifiers N/A find_referenced_templates N/A N/A ast N/A N/A N/A Finds all the referenced templates from the AST.  This will return an
    iterator over all the hardcoded template extensions, inclusions and
    imports.  If dynamic inheritance or inclusion is used, `None` will be
    yielded.

    >>> from jinja2 import Environment, meta
    >>> env = Environment()
    >>> ast = env.parse('{% extends "layout.html" %}{% include helper %}')
    >>> list(meta.find_referenced_templates(ast))
    ['layout.html', None]

    This function is useful for dependency tracking.  For example if you want
    to rebuild parts of the website after a layout template has changed.
     N/A node N/A N/A ast find_all N/A N/A nodes Extends N/A nodes FromImport N/A nodes Import N/A nodes Include N/A N/A N/A N/A isinstance N/A node template N/A nodes Const N/A N/A N/A isinstance N/A node template N/A N/A nodes Tuple N/A nodes List N/A N/A template_name N/A N/A node template items N/A N/A N/A isinstance template_name N/A nodes Const N/A N/A N/A isinstance N/A template_name value string_types N/A N/A N/A N/A template_name value N/A N/A N/A None N/A N/A N/A None N/A N/A N/A isinstance N/A N/A node template value string_types N/A N/A N/A N/A N/A node template value N/A N/A N/A N/A isinstance node N/A nodes Include N/A isinstance N/A N/A node template value N/A tuple list N/A N/A template_name N/A N/A node template value N/A N/A N/A isinstance template_name string_types N/A N/A N/A template_name N/A N/A N/A None N/A