def _get_type(self, entity, functions): entity_type = function_type.make_type([]) if entity.name == "IDENTIFIER": if entity.value in functions: entity_type = functions[entity.value] else: self._errors.append( error.Error("unknown function {}".format(string_utilities.quote(entity.value)), entity.offset) ) entity_type = None elif entity.name == "call": entity_type = function_type.make_type(entity.children[0].children[1].children[0]) return entity_type
def t_error(self, token): self._errors.append(error.Error('the illegal character {}'.format(string_utilities.quote(token.value[0])), token.lexpos)) self._lexer.skip(1)