

def parse_text(self, text):
    extends_text = self.handle_extends(text)
    if (extends_text is not None):
        return self.parse_text(extends_text)
    tokens = self.re_tokens.split(text)
    handlers = ((self.re_variable.match, self._handle_variable), (self.re_tag.match, self._handle_tag), (self.re_comment.match, self._handle_comment))
    default_handler = self._handle_string
    for token in tokens:
        for (match, handler) in handlers:
            if match(token):
                handler(tokens)
                break
        else:
            default_handler(token)
    self.flush_buffer()
    self.code_builder.add_line('return "".join({})', self.result_var)
    self.code_builder.backward_indent()

dataset/ETHPy150Open mozillazg/bustard/bustard/template.py Template.parse_text/VarMisuse@125/157 `token`->`tokens`