def parse(self, parser, tokens):
        self.parser = parser
        self.bits = tokens.split_contents()
        self.tagname = self.bits.pop(0)
        self.kwargs = {}
        self.blocks = {}
        self.forced_next = None
        # Get the first chunk of arguments until the next breakpoint
        self.arguments = self.options.get_arguments()
        self.current_argument = None
        # get a copy of the bits (tokens)
        self.todo = list(self.bits)
        # parse the bits (tokens)
        breakpoint = False
        for bit in self.bits:
            breakpoint = self.handle_bit(bit)
        if breakpoint:
            raise TrailingBreakpoint(self.tagname, breakpoint)
        # finish the bits (tokens)
        self.finish()
        # parse block tags
        self.parse_blocks()
        return self.kwargs, self.blocks
Parse a token stream
dataset/ETHPy150Open ojii/django-classy-tags/classytags/parser.py/Parser.parse