def _transform_function(self, entity, functions): name, entity_type = utilities.extract_function(entity) if name != "": functions[name] = entity_type new_functions = functions.copy() for argument in entity.children[0].children[1].children: new_functions[argument.children[0].value] = function_type.make_type(argument.children[1]) entity.children[1].children = self._make_calls(entity.children[1].children, new_functions)
def _evaluate_function(entity, functions): name, entity_type = utilities.extract_function(entity) if name != "": functions[name] = entity_type handler = _make_function_handler(entity, functions.copy()) entity_type.set_handler(handler) return entity_type