Merged interactive code to the main program for an upcoming demo, will be reverted back after all that.
This commit is contained in:
+3
-2
@@ -50,7 +50,8 @@ def get_tokens_from_expression_string(expression_string):
|
||||
if len(tokens) > 1:
|
||||
lookBehind = tokens[-1]
|
||||
if lookBehind.type == token.TokenType.exp_end:
|
||||
tokens.append(token.Token("^", token.TokenType.power))
|
||||
tokens.append(token.Token("^", token.TokenType.power))
|
||||
|
||||
if (i + 1) < len(expression_string):
|
||||
lookAHead = expression_string[i + 1]
|
||||
if lookAHead == '(':
|
||||
@@ -85,5 +86,5 @@ def replace_variables(tokens, new_constants):
|
||||
|
||||
def print_token_list(tokens):
|
||||
for tk in tokens:
|
||||
print(tk.value, end = "")
|
||||
print("%s" %(tk.value), end = "")#, token.TokenType.get_token_type_name(tk.type)), end = "")
|
||||
print()
|
||||
|
||||
Reference in New Issue
Block a user