Fixed a bug in the tokenizer to make sure it reverses the list before returning. Fixed up the calc engine, however addition/subtraction bugs still exist.
This commit is contained in:
+5
-1
@@ -69,6 +69,10 @@ def get_tokens_from_expression_string(expression_string):
|
||||
tokens.append(token.CToken(c + str(symbols_dic[c]), token.TokenType.variable))
|
||||
parsing_number = False
|
||||
tmp = ""
|
||||
|
||||
#When building this list we've effectively ordered the tokens in reverse order from how we want to
|
||||
#process them. So, reverse the order of the list before returning them to the caller, we don't want
|
||||
#the caller to have to worry about such a minor detail.
|
||||
tokens.reverse()
|
||||
|
||||
return tokens
|
||||
|
||||
|
||||
Reference in New Issue
Block a user