Updated the tokenizer to include a method to replace variable tokens with the values provided in a list.
This commit is contained in:
+5
-2
@@ -1,7 +1,10 @@
|
||||
import token
|
||||
import copy
|
||||
|
||||
def calculate_results(tokens):
|
||||
return handle_add_and_subtract(tokens)
|
||||
def calculate_results(tokens):
|
||||
new_list = copy.deepcopy(tokens)
|
||||
new_list.reverse()
|
||||
return handle_add_and_subtract(new_list)
|
||||
|
||||
def handle_parenthesis(tokens, call_has_priority = False):
|
||||
running_value = 0
|
||||
|
||||
Reference in New Issue
Block a user