FabianVegaA / sigmaF

The project SigmaF is a programming language of functional paradigm and open-source.
MIT License
21 stars 5 forks source link

allow EOF to be a graceful exit from repl #16

Closed categulario closed 2 years ago

categulario commented 2 years ago

It is a common pattern to exit a repl inserting an EOF character (Ctrl+D in most unixes). This pull request makes that possible while also relaxing the strict comparison against the exit() and clear() strings. I noticed that if I introduced a space before the function name like this: exit() then it wouldn't exit. An even better version of this would call a real exit function that would finish the thread.