Skip to content
Snippets Groups Projects
Commit e732b396 authored by Bilel El Yaagoubi's avatar Bilel El Yaagoubi
Browse files

make it work

parent d6bc88fa
Branches
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ class Calculator:
operators = STANDARD_OPERATORS
self.operators = operators
def tokenize(self, line: str) -> list[Token]:
def tokenize(self, line: str):
tokens = []
for token in line.split():
if token in self.operators:
......@@ -31,7 +31,7 @@ class Calculator:
raise ValueError(f"Invalid token {token}") from exc
return tokens
def parse(self, tokens: list[Token]) -> Expression:
def parse(self, tokens) -> Expression:
"""
Parse a list of tokens into an ordered expression.
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment