예제 #1
0
    def find_function_call(self, _id):
        self.active_function_call = self.find_function(_id)

        if self.active_function_call is None:
            raise BigError.undefined_function(
                "The function {} is not declared".format(_id))

        self._count_params = 0
예제 #2
0
    def function_validate(self, fn_name):
        self.active_function.clear()
        self._count_params = 0
        find = self.find_function(fn_name)

        if find is None:
            raise BigError.undefined_function(
                "The Function in the assignation doesn't see to be declared -> {} <-"
                .format(fn_name))
        self.active_function.id = find.id_function
        self.active_function.params_size = len(find.params)
        self.active_function.return_type = self.text_to_type(find.return_type)
        self.active_function.size = find.size
예제 #3
0
    def find_function(self, id_fun):
        if id_fun not in self._functions:
            raise BigError.undefined_function(id_fun)

        return self._functions[id_fun]