def METHOD_NAME(self, pos):
    self.current_pos = pos
    tokens = {}
    end_found = False
    while self.has_chars():
        self.eat_whitespace()
        if not self.has_chars():
            break
        if self.try_parse_attr_list_end_char():
            end_found = True
            self.get_char()
            break
        token = self.try_parse_hash()
        if token:
            if "taskId" in tokens:
                break
            tokens["taskId"] = token
            continue
        token = self.try_parse_class()
        if token:
            if not tokens.get("classes"):
                tokens["classes"] = []
            tokens["classes"].append(token)
            continue
        key, val = self.try_parse_keyvaluepair()
        if key:
            tokens[key] = val
            continue
        break
    if end_found:
        self.eat_whitespace()
        return None if self.has_chars() else tokens
    else:
        return None