(bits, parser)
return kwargs
Based on Django's `~django.template.defaulttags.token_kwargs`, but with a
    few changes:

    - No legacy mode.
    - Both keys and values are compiled as a filter
Based on Django's `~django.template.defaulttags.token_kwargs`, but with a
    few changes:
Based on Django s ~django . template . defaulttags . token_kwargs but with a few changes :
def token_kwargs(bits, parser):
    """
    Based on Django's `~django.template.defaulttags.token_kwargs`, but with a
    few changes:

    - No legacy mode.
    - Both keys and values are compiled as a filter
    """
    if not bits:
        return {}
    kwargs = OrderedDict()
    while bits:
        match = kwarg_re.match(bits[0])
        if not match or not match.group(1):
            return kwargs
        key, value = match.groups()
        del bits[:1]
        kwargs[parser.compile_filter(key)] = parser.compile_filter(value)
    return kwargs
def token_kwargs ( bits , parser ) : if not bits : return { } kwargs = OrderedDict ( ) while bits : match = kwarg_re . match ( bits [ 0 ] ) if not match or not match . group ( 1 ) : return kwargs key , value = match . groups ( ) del bits [ : 1 ] kwargs [ parser . compile_filter ( key ) ] = parser . compile_filter ( value ) return kwargs