'Return a list of tokens from a given template_string.'

def tokenize(self):

    in_tag = False
    result = []
    for bit in tag_re.split(self.template_string):
        if bit:
            result.append(self.create_token(bit, in_tag))
        in_tag = (not in_tag)
    return result
