Actual compilation worker method.

def _cor_compile(rule, var, val, result_class, key, compilation_list):
        """
        Actual compilation worker method.
        """
        compilation = compilation_list.get(key, None)
        if compilation:
            if isinstance(val, ListRule):
                result = []
                for itemv in val.value:
                    result.append(compilation['callback'](itemv))

                val = compilation['listclass'](result)
            else:
                val = compilation['callback'](val)
        return result_class(rule.operation, var, val)