"cannot unpack non-iterable method object"
What is wrong with this pls help I am trying to make a lexer but the something is wrong with the tokens variable def make_tokens(self): tokens = [] while self.current_char != None: if self.current_char in ' \t': self.advance() elif self.current_char in DIGITS: tokens.append(self.make_number) self.advance() elif self.current_char == '+': tokens.append(Token(TT_PLUS)) self.advance() elif self.current_char == '+': tokens.append(Token(TT_PLUS)) self.advance() elif self.current_char == '-': tokens.append(Token(TT_MINUS)) self.advance() elif self.current_char == '*': tokens.append(Token(TT_MUL)) self.advance() elif self.current_char == '/': tokens.append(Token(TT_DIV)) self.advance() elif self.current_char == '(': tokens.append(Token(TT_LPAREN)) self.advance() elif self.current_char == ')': tokens.append(Token(TT_RPAREN)) self.advance() else: char = self.current_char self.advance return [], IllegalCharError("'" + char + "'") return tokens, None def run(text): lexer = Lexer(text) tokens, error = lexer.make_tokens return tokens, error