Beispiel #1
0
def special_handling(key: str, val: str, ans: Dict) -> bool:
    if key == 'map':
        x = parse_kittens_key(val, args_funcs)
        if x is not None:
            action, key_def = x
            ans['key_definitions'][key_def] = action
            return True
    return False
Beispiel #2
0
def special_handling(key, val, ans):
    if key == 'map':
        action, *key_def = parse_kittens_key(val, args_funcs)
        ans['key_definitions'][tuple(key_def)] = action
        return True
Beispiel #3
0
def parse_map(val: str) -> Iterable[KittensKeyDefinition]:
    x = parse_kittens_key(val, func_with_args.args_funcs)
    if x is not None:
        yield x