

def _handle_statement(self, tag, tag_name):
    if (tag_name in ('if', 'elif', 'else', 'for')):
        if (tag_name in ('elif', 'else')):
            self.code_builder.backward_indent()
        self.code_builder.add_line('{}:'.format(tag))
        self.code_builder.forward_indent()
    elif (tag_name in ('break',)):
        self.code_builder.add_line(tag)
    elif (tag_name in ('endif', 'endfor')):
        self.code_builder.backward_indent()

dataset/ETHPy150Open mozillazg/bustard/bustard/template.py Template._handle_statement/original