class Jinja2IRGenerator(BaseIRGenerator): def __init__(self, content, *a, **kw): super(Jinja2IRGenerator, self).__init__(*a, **kw) self.tokenizer = tokenize_jinja2(contents) self.tree = IRTree() self.element_stack = [] def generate_tree(self): current = Root() self.tree.add_child(current) for type, value in self.tokenizer: pass return self.tree
def __init__(self, content, *a, **kw): super(Jinja2IRGenerator, self).__init__(*a, **kw) self.tokenizer = tokenize_jinja2(contents) self.tree = IRTree() self.element_stack = []