Updated the tokenizer to use a deque object instead of a list. The old calc_engine should still work, not tested. New parser code works with this change.
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@ debug = False
|
||||
def calculate_results(tokens):
|
||||
# Main entry into the calc_engine.
|
||||
# Returns the result of arthmetic as described by the token list.
|
||||
return process_tokens(convert_to_deque(tokens), True)
|
||||
return process_tokens(tokens, True)
|
||||
|
||||
def process_tokens(tokens, top_level = False):
|
||||
pending_operations = []
|
||||
|
||||
Reference in New Issue
Block a user