yurtsiv / mooncake

🌜 A functional, dynamic programming language
MIT License
12 stars 4 forks source link

Basic REPL #14

Open yurtsiv opened 3 years ago

yurtsiv commented 3 years ago

Basic REPL (Read–eval–print loop) needs to be implemented.

For now, it can take a single line of code, evaluate it after hitting the Enter key, and print the result.

Examples:

> 1
Integer 1
> 1 + 2
Integer 3
> let a = 1
Empty
> a  # the scope needs to be preserved
Integer 1