Fixed addition and subraction bug in the calc_engine.
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user