Home | History | Annotate | Download | only in jinja2

Lines Matching refs:node

23 def optimize(node, environment):
27 return optimizer.visit(node)
35 def visit_If(self, node):
39 if node.find(nodes.Block) is not None:
40 return self.generic_visit(node)
42 val = self.visit(node.test).as_const()
44 return self.generic_visit(node)
46 body = node.body
48 body = node.else_
50 for node in body:
51 result.extend(self.visit_list(node))
54 def fold(self, node):
56 node = self.generic_visit(node)
58 return nodes.Const.from_untrusted(node.as_const(),
59 lineno=node.lineno,
62 return node