Home | History | Annotate | Download | only in jinja2

Lines Matching refs:ast

33 def find_undeclared_variables(ast):
34 """Returns a set of all variables in the AST that will be looked up from
41 >>> ast = env.parse('{% set foo = 42 %}{{ bar + foo }}')
42 >>> meta.find_undeclared_variables(ast)
52 codegen = TrackingCodeGenerator(ast.environment)
53 codegen.visit(ast)
57 def find_referenced_templates(ast):
58 """Finds all the referenced templates from the AST. This will return an
65 >>> ast = env.parse('{% extends "layout.html" %}{% include helper %}')
66 >>> list(meta.find_referenced_templates(ast))
72 for node in ast.find_all((nodes.Extends, nodes.FromImport, nodes.Import,