Merged interactive code to the main program for an upcoming demo, will be reverted back after all that.

This commit is contained in:
2020-04-20 02:13:01 -05:00
parent 7507db75b3
commit 53f3058194
4 changed files with 120 additions and 18 deletions
+3 -2
View File
@@ -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()