Approximately fully functional!
This commit is contained in:
@@ -1,11 +1,20 @@
|
||||
import reader
|
||||
import sys
|
||||
|
||||
def main():
|
||||
print("Welcome message.")
|
||||
interpreter = reader.Reader()
|
||||
outputfile = "output.txt" if len(sys.argv) == 1 else sys.argv[1]
|
||||
interpreter = reader.Reader(outputfile)
|
||||
# REPL Loop
|
||||
while True:
|
||||
expression: str = input(">>> ")
|
||||
try:
|
||||
expression: str = input("> ").upper()
|
||||
except KeyboardInterrupt:
|
||||
print("\n>> bye")
|
||||
return
|
||||
except EOFError:
|
||||
print("\n>> bye")
|
||||
return
|
||||
interpreter.tokenize(expression)
|
||||
interpreter.run()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user