Fixed addition and subraction bug in the calc_engine.

This commit is contained in:
2020-04-10 14:34:37 -05:00
parent ee9ba528c6
commit 9cf6952eb8
2 changed files with 27 additions and 14 deletions
+4 -4
View File
@@ -52,13 +52,13 @@ class TokenType:
@staticmethod
def get_operator(character):
"""
Accepts an individual character and returns either the math operator TokenType or unknown.
"""
#
#Accepts an individual character and returns either the math operator TokenType or unknown.
#
if not character in TokenType.OPERATORS:
return TokenType.unknown
return TokenType.OPERATORS[character]
@staticmethod
def get_operator_name(tokenType):
def get_token_type_name(tokenType):
return TokenType.TOKEN_NAMES[tokenType]