Summary
The main.go should be modified to take an optional input which would be a file name.
If the file name is specified then we should try to run the monkey file instead of dropping to a REPL.
If no file is specified then drop the user into a normal REPL.
Desired Behavior
$ go run main.go
Hello michohl! This is the Monkey programming language!
Feel free to type in commands
>>
my_script.my
let x = 2
let y = 3
puts(x * y)
$ go run main.go my_script.my
6
Summary
The
main.goshould be modified to take an optional input which would be a file name.If the file name is specified then we should try to run the monkey file instead of dropping to a REPL.
If no file is specified then drop the user into a normal REPL.
Desired Behavior
my_script.my